package com.ruoyi.tb.lmt.service.impl;

import cn.hutool.core.io.FileUtil;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.vo.SysOssVo;
import com.ruoyi.system.service.ISysOssService;
import com.ruoyi.tb.lmt.domain.bo.*;
import com.ruoyi.tb.lmt.domain.obj.*;
import com.ruoyi.tb.lmt.domain.vo.*;
import com.ruoyi.tb.lmt.service.*;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.*;

/**
 * @author zoubeibei
 * @date 2023年12月14日 9:22
 */
@RequiredArgsConstructor
@Service
public class ClientServiceImpl implements IClientService {

    @Autowired
    private ISysOssService iSysOssService;

    @Autowired
    private IDrCartypeService iDrCartypeService;

    @Autowired
    private IDrCheckerService iDrCheckerService;

    @Autowired
    private IDrDamperDataService iDrDamperDataService;

    @Autowired
    private IDrInterfaceService iDrInterfaceService;

    @Autowired
    private IDrMonoVsetService iDrMonoVsetService;

    @Autowired
    private IDrMultiVsetService iDrMultiVsetService;

    @Autowired
    private IDrOperatorService iDrOperatorService;

    @Autowired
    private IDrPassService iDrPassService;

    @Autowired
    private IMcgsAlarmInfoService iMcgsAlarmInfoService;

    @Autowired
    private IMcgsFpf109eJhbzService iMcgsFpf109eJhbzService;

    @Autowired
    private IMcgsFpf109ezService iMcgsFpf109ezService;

    @Autowired
    private IMcgsFpf109eZybzService iMcgsFpf109eZybzService;

    @Autowired
    private IMcgsFpfzService iMcgsFpfzService;

    @Autowired
    private IMcgsInfoService iMcgsInfoService;

    @Autowired
    private IMcgsJjf1zService iMcgsJjf1zService;

    @Autowired
    private IMcgsJjf2zService iMcgsJjf2zService;

    @Autowired
    private IMcgsJjfzService iMcgsJjfzService;

    @Autowired
    private IMcgsQj1QdjczService iMcgsQj1QdjczService;

    @Autowired
    private IMcgsQk1QkfzService iMcgsQk1QkfzService;

    @Autowired
    private IMcgsXzz1Service iMcgsXzz1Service;

    @Autowired
    private IMcgsXzzService iMcgsXzzService;

    @Autowired
    private IMcgsZchzService iMcgsZchzService;

    @Autowired
    private IMcgsZdfzService iMcgsZdfzService;

    @Autowired
    private IMcgsZjfzService iMcgsZjfzService;

    @Autowired
    private IOilSampleDetectionService iOilSampleDetectionService;

    @Autowired
    private IClientFileService iClientFileService;

    private final static String http10002 = "/bjclient/10002";
    private final static String http10003 = "/bjclient/10003";
    private final static String http10004 = "/bjclient/10004";
    private final static String http10005 = "/bjclient/10005";

    private final static String http10006 = "/bjclient/10006";

    private final static String http10007 = "/bjclient/10007";

    private final static String http10008 = "/bjclient/10008";

    private final static String http10009 = "/bjclient/10009";

    @Override
    public Boolean get10002(ClientRegistryVo clientRegistryVo) {

        try{
            String clientCode = clientRegistryVo.getClientCode();
            if(StringUtils.isEmpty(clientCode)){
                //大机编号为空
                return false;
            }
            String clientAddress = clientRegistryVo.getClientAddress();
            if(StringUtils.isEmpty(clientAddress)){
                //地址不存在
                return false;
            }
            String url = clientAddress + http10002;
            HttpRequest post = HttpUtil.createPost(url)
                .header("Content-Type", "application/json");

            for (String tempTableName : DamperObj.tableName) {
                //carType表
                syncCarType(post, clientCode,tempTableName);
                //checker表
                syncChecker(post, clientCode,tempTableName);
                //damperData表
                syncDamperData(post, clientCode,tempTableName);
                //interface表
                syncInterface(post, clientCode,tempTableName);
                //monoVset表
                syncMonoVset(post, clientCode,tempTableName);
                //multiVset表
                syncMultiVset(post, clientCode,tempTableName);
                //operator表
                syncOperator(post, clientCode,tempTableName);
                //pass表
                syncPass(post, clientCode,tempTableName);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
        return true;
    }

    @Override
    public Boolean get10003(ClientRegistryVo clientRegistryVo) {
        try{
            String clientCode = clientRegistryVo.getClientCode();
            if(StringUtils.isEmpty(clientCode)){
                //大机编号为空
                return false;
            }
            String clientAddress = clientRegistryVo.getClientAddress();
            if(StringUtils.isEmpty(clientAddress)){
                //地址不存在
                return false;
            }
            String url = clientAddress + http10003;

            HttpRequest post = HttpUtil.createPost(url)
                .header("Content-Type", "application/json");

            for (String tempTableName : BrakeValueObj.tableName) {

                syncMCGS0000(post, clientCode, tempTableName);
                syncMCGS0001(post, clientCode, tempTableName);
                syncMCGS0002(post, clientCode, tempTableName);
                syncMCGS0003(post, clientCode, tempTableName);
                syncMCGS0004(post, clientCode, tempTableName);
                syncMCGS0005(post, clientCode, tempTableName);
                syncMCGS0006(post, clientCode, tempTableName);
                syncMCGS0007(post, clientCode, tempTableName);
                syncMCGS0008(post, clientCode, tempTableName);
                syncMCGS0009(post, clientCode, tempTableName);
                syncMCGS0010(post, clientCode, tempTableName);
                syncMCGS0011(post, clientCode, tempTableName);
                syncMCGS0012(post, clientCode, tempTableName);
                syncMCGS0013(post, clientCode, tempTableName);
                syncMCGS0014(post, clientCode, tempTableName);
                syncMCGS0015(post, clientCode, tempTableName);
            }

        }catch (Exception e){
            e.printStackTrace();
            return false;
        }

        return true;
    }

    @Override
    public Boolean get10004(ClientRegistryVo clientRegistryVo){
        String clientCode = clientRegistryVo.getClientCode();
        if(StringUtils.isEmpty(clientCode)){
            //大机编号为空
            return false;
        }
        String clientAddress = clientRegistryVo.getClientAddress();
        if(StringUtils.isEmpty(clientAddress)){
            //地址不存在
            return false;
        }
        String url = clientAddress + http10004;
        HttpResponse httpResponse = HttpUtil.createGet(url).executeAsync();
        String filename = httpResponse.header("filename");
        byte[] bytes = httpResponse.bodyBytes();
        iSysOssService.uploadBackups(filename, "application/msaccess", bytes);
        return true;
    }

    @Override
    public Boolean get10005(ClientRegistryVo clientRegistryVo){
        String clientCode = clientRegistryVo.getClientCode();
        if(StringUtils.isEmpty(clientCode)){
            //大机编号为空
            return false;
        }
        String clientAddress = clientRegistryVo.getClientAddress();
        if(StringUtils.isEmpty(clientAddress)){
            //地址不存在
            return false;
        }
        String url = clientAddress + http10005;
        HttpResponse httpResponse = HttpUtil.createGet(url).executeAsync();
        String filename = httpResponse.header("filename");
        byte[] bytes = httpResponse.bodyBytes();
        iSysOssService.uploadBackups(filename, "application/x-mdb", bytes);
        return true;
    }

    @Override
    public Boolean get10006(ClientRegistryVo clientRegistryVo) {
        try{
            String clientCode = clientRegistryVo.getClientCode();
            if(StringUtils.isEmpty(clientCode)){
                //大机编号为空
                return false;
            }
            String clientAddress = clientRegistryVo.getClientAddress();
            if(StringUtils.isEmpty(clientAddress)){
                //地址不存在
                return false;
            }
            String url = clientAddress + http10006;

            HttpRequest post = HttpUtil.createPost(url)
                .header("Content-Type", "application/json");

            HttpResponse execute = post.execute();
            String result = execute.body();

            Map strResult = getStrResult(result);
            List<String> lines = (List<String>)strResult.get("lines");
            for(String temp : lines){

                String[] split = temp.split(",");

                OilSampleDetectionBo bo = new OilSampleDetectionBo();
                bo.setOilFe(doNullOrTrim(split[1]));
                bo.setOilCr(doNullOrTrim(split[3]));
                bo.setOilPb(doNullOrTrim(split[5]));
                bo.setOilCu(doNullOrTrim(split[7]));
                bo.setOilSn(doNullOrTrim(split[9]));
                bo.setOilAl(doNullOrTrim(split[11]));
                bo.setOilNi(doNullOrTrim(split[13]));
                bo.setOilAg(doNullOrTrim(split[15]));
                bo.setOilSi(doNullOrTrim(split[17]));
                bo.setOilB(doNullOrTrim(split[19]));
                bo.setOilNa(doNullOrTrim(split[21]));
                bo.setOilMg(doNullOrTrim(split[23]));
                bo.setOilCa(doNullOrTrim(split[25]));
                bo.setOilBa(doNullOrTrim(split[27]));
                bo.setOilP(doNullOrTrim(split[29]));
                bo.setOilZn(doNullOrTrim(split[31]));
                bo.setOilMo(doNullOrTrim(split[33]));
                bo.setOilTi(doNullOrTrim(split[35]));
                bo.setOilV(doNullOrTrim(split[37]));
                bo.setOilMn(doNullOrTrim(split[39]));
                bo.setOilCd(doNullOrTrim(split[41]));
                bo.setOilH(doNullOrTrim(split[43]));
                bo.setOilC(doNullOrTrim(split[45]));
                bo.setOilData(doNullOrTrim(split[47]));
                bo.setOilId(doNullOrTrim(split[49]));
                bo.setOilType(doNullOrTrim(split[50]));
                bo.setBurnMode(doNullOrTrim(split[53]));

                //判断是否重复
                List<OilSampleDetectionVo> queryList
                    = iOilSampleDetectionService.queryList(bo);
                if(!CollectionUtils.isEmpty(queryList)){
                    //已包含跳过
                    continue;
                }

                bo.setDjNo(clientCode);
                bo.setCreateBy("admin");
                bo.setCreateTime(new Date());
                bo.setUpdateBy("admin");
                bo.setUpdateTime(new Date());

                iOilSampleDetectionService.insertByBo(bo);
            }

        }catch (Exception e){
            e.printStackTrace();
            return false;
        }
        return true;
    }

    @Override
    public Boolean get10007(ClientRegistryVo clientRegistryVo) {
        String clientCode = clientRegistryVo.getClientCode();
        if(StringUtils.isEmpty(clientCode)){
            //大机编号为空
            return false;
        }
        String clientAddress = clientRegistryVo.getClientAddress();
        if(StringUtils.isEmpty(clientAddress)){
            //地址不存在
            return false;
        }
        String url = clientAddress + http10007;
        HttpResponse httpResponse = HttpUtil.createGet(url).executeAsync();
        String filename = httpResponse.header("filename");
        byte[] bytes = httpResponse.bodyBytes();
        iSysOssService.uploadBackups(filename, "", bytes);
        return true;
    }

    @Override
    public Boolean do10008(ClientRegistryVo clientRegistryVo) {
        String clientCode = clientRegistryVo.getClientCode();
        if(StringUtils.isEmpty(clientCode)){
            //大机编号为空
            return false;
        }
        String clientAddress = clientRegistryVo.getClientAddress();
        if(StringUtils.isEmpty(clientAddress)){
            //地址不存在
            return false;
        }

        String url = clientAddress + http10008;
        String allFiles = HttpUtil.get(url);
        List<ElectronicFilesObj> lists = JSONObject.parseArray(allFiles, ElectronicFilesObj.class);
        if(CollectionUtils.isEmpty(lists)){
            return false;
        }
        List<ClientFileBo> downList = new ArrayList<>();
        for(ElectronicFilesObj temp : lists){
            ClientFileBo bo = new ClientFileBo();
            bo.setDjNo(clientCode);
            bo.setOriginalName(temp.getFileName());
            List<ClientFileVo> clientFileVos = iClientFileService.queryList(bo);
            if(CollectionUtils.isEmpty(clientFileVos)){
                bo.setOriginalPath(temp.getFilePath());
                bo.setCreateBy("admin");
                bo.setCreateTime(new Date());
                bo.setUpdateBy("admin");
                bo.setUpdateTime(new Date());
                downList.add(bo);
            }
        }

        if(CollectionUtils.isEmpty(downList)){
            return true;
        }
        for(ClientFileBo temp : downList){
            String url10009 = clientAddress + http10009;
            ElectronicFilesObj body = new ElectronicFilesObj();
            body.setFileName(temp.getOriginalName());
            body.setFilePath(temp.getOriginalPath());
            String bodyStr = JSONObject.toJSONString(body);
            HttpResponse httpResponse = HttpUtil.createPost(url10009).body(bodyStr).executeAsync();
            String filename = httpResponse.header("filename");
            byte[] bytes = httpResponse.bodyBytes();
            SysOssVo sysOssVo = iSysOssService.uploadBackups(filename, "", bytes);
            if(sysOssVo == null){
                continue;
            }
            temp.setFileName(sysOssVo.getFileName());
            temp.setFileSuffix(sysOssVo.getFileSuffix());
            temp.setUrl(sysOssVo.getUrl());
            temp.setService(sysOssVo.getService());
            iClientFileService.insertByBo(temp);
        }

        return true;
    }


    private String doNullOrTrim(String var){
        if(StringUtils.isEmpty(var)){
            return null;
        }
        return var.trim();
    }

    private void syncMCGS0015(HttpRequest post, String clientCode,String tempTableName) {
        if(!BrakeValueObj.MCGS_0015.equals(tempTableName)){
            return;
        }
        String maxMcgsTime = iMcgsZdfzService.getMaxMcgsTime();
        Map resultMap = post10003(post, tempTableName, maxMcgsTime);
        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            McgsZdfzBo bo = new McgsZdfzBo();

            String mcgsTime = (String)temp.get(MCGS0015Obj.mcgsTime);
            bo.setMcgsTime(mcgsTime);
            String mcgsTimeMs = (String)temp.get(MCGS0015Obj.mcgsTimeMs);
            bo.setMcgsTimeMs(mcgsTimeMs);
            String mcgsCzz = (String)temp.get(MCGS0015Obj.mcgsCzz);
            bo.setMcgsCzz(mcgsCzz);
            String mcgsJxbh = (String)temp.get(MCGS0015Obj.mcgsJxbh);
            bo.setMcgsJxbh(mcgsJxbh);
            String mcgsFh = (String)temp.get(MCGS0015Obj.mcgsFh);
            bo.setMcgsFh(mcgsFh);
            String mcgsSch = (String)temp.get(MCGS0015Obj.mcgsSch);
            bo.setMcgsSch(mcgsSch);
            String mcgsZdf1 = (String)temp.get(MCGS0015Obj.mcgsZdf1);
            bo.setMcgsZdf1(mcgsZdf1);
            String mcgsZdf2 = (String)temp.get(MCGS0015Obj.mcgsZdf2);
            bo.setMcgsZdf2(mcgsZdf2);
            String mcgsZdf3 = (String)temp.get(MCGS0015Obj.mcgsZdf3);
            bo.setMcgsZdf3(mcgsZdf3);
            String mcgsBy1 = (String)temp.get(MCGS0015Obj.mcgsBy1);
            bo.setMcgsBy1(mcgsBy1);
            String mcgsZsch = (String)temp.get(MCGS0015Obj.mcgsZsch);
            bo.setMcgsZsch(mcgsZsch);
            String mcgsZdf4 = (String)temp.get(MCGS0015Obj.mcgsZdf4);
            bo.setMcgsZdf4(mcgsZdf4);
            String mcgsJxbhsr = (String)temp.get(MCGS0015Obj.mcgsJxbhsr);
            bo.setMcgsJxbhsr(mcgsJxbhsr);

            List<McgsZdfzVo> queryList = iMcgsZdfzService.queryList(bo);
            if(!CollectionUtils.isEmpty(queryList)){
                continue;
            }

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iMcgsZdfzService.insertByBo(bo);
        }
    }

    private void syncMCGS0014(HttpRequest post, String clientCode,String tempTableName) {
        if(!BrakeValueObj.MCGS_0014.equals(tempTableName)){
            return;
        }
        String maxMcgsTime = iMcgsZchzService.getMaxMcgsTime();
        Map resultMap = post10003(post, tempTableName, maxMcgsTime);
        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            McgsZchzBo bo = new McgsZchzBo();

            String mcgsTime = (String)temp.get(MCGS0014Obj.mcgsTime);
            bo.setMcgsTime(mcgsTime);
            String mcgsTimeMs = (String)temp.get(MCGS0014Obj.mcgsTimeMs);
            bo.setMcgsTimeMs(mcgsTimeMs);
            String mcgsSch = (String)temp.get(MCGS0014Obj.mcgsSch);
            bo.setMcgsSch(mcgsSch);
            String mcgsZsch = (String)temp.get(MCGS0014Obj.mcgsZsch);
            bo.setMcgsZsch(mcgsZsch);

            List<McgsZchzVo> queryList = iMcgsZchzService.queryList(bo);
            if(!CollectionUtils.isEmpty(queryList)){
                continue;
            }

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iMcgsZchzService.insertByBo(bo);
        }
    }

    private void syncMCGS0013(HttpRequest post, String clientCode,String tempTableName) {
        if(!BrakeValueObj.MCGS_0013.equals(tempTableName)){
            return;
        }
        String maxMcgsTime = iMcgsJjfzService.getMaxMcgsTime();
        Map resultMap = post10003(post, tempTableName, maxMcgsTime);
        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            McgsJjfzBo bo = new McgsJjfzBo();

            String mcgsTime = (String)temp.get(MCGS0013Obj.mcgsTime);
            bo.setMcgsTime(mcgsTime);
            String mcgsTimeMs = (String)temp.get(MCGS0013Obj.mcgsTimeMs);
            bo.setMcgsTimeMs(mcgsTimeMs);
            String mcgsCzz = (String)temp.get(MCGS0013Obj.mcgsCzz);
            bo.setMcgsCzz(mcgsCzz);
            String mcgsJxbh = (String)temp.get(MCGS0013Obj.mcgsJxbh);
            bo.setMcgsJxbh(mcgsJxbh);
            String mcgsFh = (String)temp.get(MCGS0013Obj.mcgsFh);
            bo.setMcgsFh(mcgsFh);
            String mcgsSch = (String)temp.get(MCGS0013Obj.mcgsSch);
            bo.setMcgsSch(mcgsSch);
            String mcgsJjf1 = (String)temp.get(MCGS0013Obj.mcgsJjf1);
            bo.setMcgsJjf1(mcgsJjf1);
            String mcgsJjf2 = (String)temp.get(MCGS0013Obj.mcgsJjf2);
            bo.setMcgsJjf2(mcgsJjf2);
            String mcgsJjf3 = (String)temp.get(MCGS0013Obj.mcgsJjf3);
            bo.setMcgsJjf3(mcgsJjf3);
            String mcgsJjf4 = (String)temp.get(MCGS0013Obj.mcgsJjf4);
            bo.setMcgsJjf4(mcgsJjf4);
            String mcgsJjf5 = (String)temp.get(MCGS0013Obj.mcgsJjf5);
            bo.setMcgsJjf5(mcgsJjf5);
            String mcgsJjf6 = (String)temp.get(MCGS0013Obj.mcgsJjf6);
            bo.setMcgsJjf6(mcgsJjf6);
            String mcgsJjf7 = (String)temp.get(MCGS0013Obj.mcgsJjf7);
            bo.setMcgsJjf7(mcgsJjf7);
            String mcgsJjf8 = (String)temp.get(MCGS0013Obj.mcgsJjf8);
            bo.setMcgsJjf8(mcgsJjf8);
            String mcgsJjf9 = (String)temp.get(MCGS0013Obj.mcgsJjf9);
            bo.setMcgsJjf9(mcgsJjf9);
            String mcgsJjf10 = (String)temp.get(MCGS0013Obj.mcgsJjf10);
            bo.setMcgsJjf10(mcgsJjf10);
            String mcgsBy1 = (String)temp.get(MCGS0013Obj.mcgsBy1);
            bo.setMcgsBy1(mcgsBy1);
            String mcgsZsch = (String)temp.get(MCGS0013Obj.mcgsZsch);
            bo.setMcgsZsch(mcgsZsch);

            List<McgsJjfzVo> queryList = iMcgsJjfzService.queryList(bo);
            if(!CollectionUtils.isEmpty(queryList)){
                continue;
            }

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iMcgsJjfzService.insertByBo(bo);
        }
    }

    private void syncMCGS0012(HttpRequest post, String clientCode,String tempTableName) {
        if(!BrakeValueObj.MCGS_0012.equals(tempTableName)){
            return;
        }
        String maxMcgsTime = iMcgsJjf2zService.getMaxMcgsTime();
        Map resultMap = post10003(post, tempTableName, maxMcgsTime);
        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            McgsJjf2zBo bo = new McgsJjf2zBo();

            String mcgsTime = (String)temp.get(MCGS0012Obj.mcgsTime);
            bo.setMcgsTime(mcgsTime);
            String mcgsTimeMs = (String)temp.get(MCGS0012Obj.mcgsTimeMs);
            bo.setMcgsTimeMs(mcgsTimeMs);
            String mcgsCzz = (String)temp.get(MCGS0012Obj.mcgsCzz);
            bo.setMcgsCzz(mcgsCzz);
            String mcgsJxbh = (String)temp.get(MCGS0012Obj.mcgsJxbh);
            bo.setMcgsJxbh(mcgsJxbh);
            String mcgsFh = (String)temp.get(MCGS0012Obj.mcgsFh);
            bo.setMcgsFh(mcgsFh);
            String mcgsSch = (String)temp.get(MCGS0012Obj.mcgsSch);
            bo.setMcgsSch(mcgsSch);
            String mcgsJjf1 = (String)temp.get(MCGS0012Obj.mcgsJjf1);
            bo.setMcgsJjf1(mcgsJjf1);
            String mcgsJjf2 = (String)temp.get(MCGS0012Obj.mcgsJjf2);
            bo.setMcgsJjf2(mcgsJjf2);
            String mcgsJjf3 = (String)temp.get(MCGS0012Obj.mcgsJjf3);
            bo.setMcgsJjf3(mcgsJjf3);
            String mcgsJjf4 = (String)temp.get(MCGS0012Obj.mcgsJjf4);
            bo.setMcgsJjf4(mcgsJjf4);
            String mcgsJjf5 = (String)temp.get(MCGS0012Obj.mcgsJjf5);
            bo.setMcgsJjf5(mcgsJjf5);
            String mcgsJjf6 = (String)temp.get(MCGS0012Obj.mcgsJjf6);
            bo.setMcgsJjf6(mcgsJjf6);
            String mcgsJjf7 = (String)temp.get(MCGS0012Obj.mcgsJjf7);
            bo.setMcgsJjf7(mcgsJjf7);
            String mcgsJjf8 = (String)temp.get(MCGS0012Obj.mcgsJjf8);
            bo.setMcgsJjf8(mcgsJjf8);
            String mcgsJjf9 = (String)temp.get(MCGS0012Obj.mcgsJjf9);
            bo.setMcgsJjf9(mcgsJjf9);
            String mcgsJjf10 = (String)temp.get(MCGS0012Obj.mcgsJjf10);
            bo.setMcgsJjf10(mcgsJjf10);
            String mcgsBy1 = (String)temp.get(MCGS0012Obj.mcgsBy1);
            bo.setMcgsBy1(mcgsBy1);
            String mcgsZsch = (String)temp.get(MCGS0012Obj.mcgsZsch);
            bo.setMcgsZsch(mcgsZsch);

            List<McgsJjf2zVo> queryList = iMcgsJjf2zService.queryList(bo);
            if(!CollectionUtils.isEmpty(queryList)){
                continue;
            }

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iMcgsJjf2zService.insertByBo(bo);
        }
    }

    private void syncMCGS0011(HttpRequest post, String clientCode,String tempTableName) {
        if(!BrakeValueObj.MCGS_0011.equals(tempTableName)){
            return;
        }
        String maxMcgsTime = iMcgsJjf1zService.getMaxMcgsTime();
        Map resultMap = post10003(post, tempTableName, maxMcgsTime);
        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            McgsJjf1zBo bo = new McgsJjf1zBo();

            String mcgsTime = (String)temp.get(MCGS0011Obj.mcgsTime);
            bo.setMcgsTime(mcgsTime);
            String mcgsTimeMs = (String)temp.get(MCGS0011Obj.mcgsTimeMs);
            bo.setMcgsTimeMs(mcgsTimeMs);
            String mcgsCzz = (String)temp.get(MCGS0011Obj.mcgsCzz);
            bo.setMcgsCzz(mcgsCzz);
            String mcgsJxbh = (String)temp.get(MCGS0011Obj.mcgsJxbh);
            bo.setMcgsJxbh(mcgsJxbh);
            String mcgsFh = (String)temp.get(MCGS0011Obj.mcgsFh);
            bo.setMcgsFh(mcgsFh);
            String mcgsSch = (String)temp.get(MCGS0011Obj.mcgsSch);
            bo.setMcgsSch(mcgsSch);
            String mcgsJjf1 = (String)temp.get(MCGS0011Obj.mcgsJjf1);
            bo.setMcgsJjf1(mcgsJjf1);
            String mcgsJjf2 = (String)temp.get(MCGS0011Obj.mcgsJjf2);
            bo.setMcgsJjf2(mcgsJjf2);
            String mcgsJjf3 = (String)temp.get(MCGS0011Obj.mcgsJjf3);
            bo.setMcgsJjf3(mcgsJjf3);
            String mcgsJjf4 = (String)temp.get(MCGS0011Obj.mcgsJjf4);
            bo.setMcgsJjf4(mcgsJjf4);
            String mcgsJjf5 = (String)temp.get(MCGS0011Obj.mcgsJjf5);
            bo.setMcgsJjf5(mcgsJjf5);
            String mcgsJjf6 = (String)temp.get(MCGS0011Obj.mcgsJjf6);
            bo.setMcgsJjf6(mcgsJjf6);
            String mcgsJjf7 = (String)temp.get(MCGS0011Obj.mcgsJjf7);
            bo.setMcgsJjf7(mcgsJjf7);
            String mcgsJjf8 = (String)temp.get(MCGS0011Obj.mcgsJjf8);
            bo.setMcgsJjf8(mcgsJjf8);
            String mcgsJjf9 = (String)temp.get(MCGS0011Obj.mcgsJjf9);
            bo.setMcgsJjf9(mcgsJjf9);
            String mcgsJjf10 = (String)temp.get(MCGS0011Obj.mcgsJjf10);
            bo.setMcgsJjf10(mcgsJjf10);
            String mcgsBy1 = (String)temp.get(MCGS0011Obj.mcgsBy1);
            bo.setMcgsBy1(mcgsBy1);
            String mcgsZsch = (String)temp.get(MCGS0011Obj.mcgsZsch);
            bo.setMcgsZsch(mcgsZsch);

            List<McgsJjf1zVo> queryList = iMcgsJjf1zService.queryList(bo);
            if(!CollectionUtils.isEmpty(queryList)){
                continue;
            }

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iMcgsJjf1zService.insertByBo(bo);
        }
    }

    private void syncMCGS0010(HttpRequest post, String clientCode,String tempTableName) {
        if(!BrakeValueObj.MCGS_0010.equals(tempTableName)){
            return;
        }
        String maxMcgsTime = iMcgsXzz1Service.getMaxMcgsTime();
        Map resultMap = post10003(post, tempTableName, maxMcgsTime);
        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            McgsXzz1Bo bo = new McgsXzz1Bo();

            String mcgsTime = (String)temp.get(MCGS0010Obj.mcgsTime);
            bo.setMcgsTime(mcgsTime);
            String mcgsTimeMs = (String)temp.get(MCGS0010Obj.mcgsTimeMs);
            bo.setMcgsTimeMs(mcgsTimeMs);
            String mcgsCzz = (String)temp.get(MCGS0010Obj.mcgsCzz);
            bo.setMcgsCzz(mcgsCzz);
            String mcgsJxbh = (String)temp.get(MCGS0010Obj.mcgsJxbh);
            bo.setMcgsJxbh(mcgsJxbh);
            String mcgsFh = (String)temp.get(MCGS0010Obj.mcgsFh);
            bo.setMcgsFh(mcgsFh);
            String mcgsSch = (String)temp.get(MCGS0010Obj.mcgsSch);
            bo.setMcgsSch(mcgsSch);
            String mcgsXz1 = (String)temp.get(MCGS0010Obj.mcgsXz1);
            bo.setMcgsXz10(mcgsXz1);
            String mcgsXz2 = (String)temp.get(MCGS0010Obj.mcgsXz2);
            bo.setMcgsXz2(mcgsXz2);
            String mcgsXz3 = (String)temp.get(MCGS0010Obj.mcgsXz3);
            bo.setMcgsXz3(mcgsXz3);
            String mcgsXz4 = (String)temp.get(MCGS0010Obj.mcgsXz4);
            bo.setMcgsXz4(mcgsXz4);
            String mcgsXz5 = (String)temp.get(MCGS0010Obj.mcgsXz5);
            bo.setMcgsXz5(mcgsXz5);
            String mcgsXz6 = (String)temp.get(MCGS0010Obj.mcgsXz6);
            bo.setMcgsXz6(mcgsXz6);
            String mcgsXz7 = (String)temp.get(MCGS0010Obj.mcgsXz7);
            bo.setMcgsXz7(mcgsXz7);
            String mcgsXz8 = (String)temp.get(MCGS0010Obj.mcgsXz8);
            bo.setMcgsXz8(mcgsXz8);
            String mcgsXz9 = (String)temp.get(MCGS0010Obj.mcgsXz9);
            bo.setMcgsXz9(mcgsXz9);
            String mcgsXz10 = (String)temp.get(MCGS0010Obj.mcgsXz10);
            bo.setMcgsXz10(mcgsXz10);
            String mcgsXz11 = (String)temp.get(MCGS0010Obj.mcgsXz11);
            bo.setMcgsXz11(mcgsXz11);
            String mcgsXz12 = (String)temp.get(MCGS0010Obj.mcgsXz12);
            bo.setMcgsXz12(mcgsXz12);
            String mcgsXz13 = (String)temp.get(MCGS0010Obj.mcgsXz13);
            bo.setMcgsXz13(mcgsXz13);
            String mcgsXz14 = (String)temp.get(MCGS0010Obj.mcgsXz14);
            bo.setMcgsXz14(mcgsXz14);
            String mcgsXz15 = (String)temp.get(MCGS0010Obj.mcgsXz15);
            bo.setMcgsXz15(mcgsXz15);
            String mcgsXz16 = (String)temp.get(MCGS0010Obj.mcgsXz16);
            bo.setMcgsXz16(mcgsXz16);
            String mcgsXz17 = (String)temp.get(MCGS0010Obj.mcgsXz17);
            bo.setMcgsXz17(mcgsXz17);
            String mcgsXz18 = (String)temp.get(MCGS0010Obj.mcgsXz18);
            bo.setMcgsXz18(mcgsXz18);
            String mcgsXz19 = (String)temp.get(MCGS0010Obj.mcgsXz19);
            bo.setMcgsXz19(mcgsXz19);
            String mcgsXljc = (String)temp.get(MCGS0010Obj.mcgsXljc);
            bo.setMcgsXljc(mcgsXljc);
            String mcgsBy1 = (String)temp.get(MCGS0010Obj.mcgsBy1);
            bo.setMcgsBy1(mcgsBy1);
            String mcgsZsch = (String)temp.get(MCGS0010Obj.mcgsZsch);
            bo.setMcgsZsch(mcgsZsch);

            List<McgsXzz1Vo> queryList = iMcgsXzz1Service.queryList(bo);
            if(!CollectionUtils.isEmpty(queryList)){
                continue;
            }

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iMcgsXzz1Service.insertByBo(bo);
        }
    }

    private void syncMCGS0009(HttpRequest post, String clientCode,String tempTableName) {
        if(!BrakeValueObj.MCGS_0009.equals(tempTableName)){
            return;
        }
        String maxMcgsTime = iMcgsXzzService.getMaxMcgsTime();
        Map resultMap = post10003(post, tempTableName, maxMcgsTime);
        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            McgsXzzBo bo = new McgsXzzBo();

            String mcgsTime = (String)temp.get(MCGS0009Obj.mcgsTime);
            bo.setMcgsTime(mcgsTime);
            String mcgsTimeMs = (String)temp.get(MCGS0009Obj.mcgsTimeMs);
            bo.setMcgsTimeMs(mcgsTimeMs);
            String mcgsCzz = (String)temp.get(MCGS0009Obj.mcgsCzz);
            bo.setMcgsCzz(mcgsCzz);
            String mcgsJxbh = (String)temp.get(MCGS0009Obj.mcgsJxbh);
            bo.setMcgsJxbh(mcgsJxbh);
            String mcgsFh = (String)temp.get(MCGS0009Obj.mcgsFh);
            bo.setMcgsFh(mcgsFh);
            String mcgsSch = (String)temp.get(MCGS0009Obj.mcgsSch);
            bo.setMcgsSch(mcgsSch);
            String mcgsXz1 = (String)temp.get(MCGS0009Obj.mcgsXz1);
            bo.setMcgsXz1(mcgsXz1);
            String mcgsXz2 = (String)temp.get(MCGS0009Obj.mcgsXz2);
            bo.setMcgsXz20(mcgsXz2);
            String mcgsXz3 = (String)temp.get(MCGS0009Obj.mcgsXz3);
            bo.setMcgsXz3(mcgsXz3);
            String mcgsXz4 = (String)temp.get(MCGS0009Obj.mcgsXz4);
            bo.setMcgsXz4(mcgsXz4);
            String mcgsXz5 = (String)temp.get(MCGS0009Obj.mcgsXz5);
            bo.setMcgsXz5(mcgsXz5);
            String mcgsXz6 = (String)temp.get(MCGS0009Obj.mcgsXz6);
            bo.setMcgsXz6(mcgsXz6);
            String mcgsXz7 = (String)temp.get(MCGS0009Obj.mcgsXz7);
            bo.setMcgsXz7(mcgsXz7);
            String mcgsXz8 = (String)temp.get(MCGS0009Obj.mcgsXz8);
            bo.setMcgsXz8(mcgsXz8);
            String mcgsXz9 = (String)temp.get(MCGS0009Obj.mcgsXz9);
            bo.setMcgsXz9(mcgsXz9);
            String mcgsXz10 = (String)temp.get(MCGS0009Obj.mcgsXz10);
            bo.setMcgsXz10(mcgsXz10);
            String mcgsXz11 = (String)temp.get(MCGS0009Obj.mcgsXz11);
            bo.setMcgsXz11(mcgsXz11);
            String mcgsXz12 = (String)temp.get(MCGS0009Obj.mcgsXz12);
            bo.setMcgsXz12(mcgsXz12);
            String mcgsXz13 = (String)temp.get(MCGS0009Obj.mcgsXz13);
            bo.setMcgsXz13(mcgsXz13);
            String mcgsXz14 = (String)temp.get(MCGS0009Obj.mcgsXz14);
            bo.setMcgsXz14(mcgsXz14);
            String mcgsXz15 = (String)temp.get(MCGS0009Obj.mcgsXz15);
            bo.setMcgsXz15(mcgsXz15);
            String mcgsXz16 = (String)temp.get(MCGS0009Obj.mcgsXz16);
            bo.setMcgsXz16(mcgsXz16);
            String mcgsXz17 = (String)temp.get(MCGS0009Obj.mcgsXz17);
            bo.setMcgsXz17(mcgsXz17);
            String mcgsXz18 = (String)temp.get(MCGS0009Obj.mcgsXz18);
            bo.setMcgsXz18(mcgsXz18);
            String mcgsXz19 = (String)temp.get(MCGS0009Obj.mcgsXz19);
            bo.setMcgsXz19(mcgsXz19);
            String mcgsBy1 = (String)temp.get(MCGS0009Obj.mcgsBy1);
            bo.setMcgsBy1(mcgsBy1);
            String mcgsZsch = (String)temp.get(MCGS0009Obj.mcgsZsch);
            bo.setMcgsZsch(mcgsZsch);
            String mcgsXz20 = (String)temp.get(MCGS0009Obj.mcgsXz20);
            bo.setMcgsXz20(mcgsXz20);

            List<McgsXzzVo> queryList = iMcgsXzzService.queryList(bo);
            if(!CollectionUtils.isEmpty(queryList)){
                continue;
            }

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iMcgsXzzService.insertByBo(bo);
        }
    }

    private void syncMCGS0008(HttpRequest post, String clientCode,String tempTableName) {
        if(!BrakeValueObj.MCGS_0008.equals(tempTableName)){
            return;
        }
        String maxMcgsTime = iMcgsFpfzService.getMaxMcgsTime();
        Map resultMap = post10003(post, tempTableName, maxMcgsTime);
        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            McgsFpfzBo bo = new McgsFpfzBo();

            String mcgsTime = (String)temp.get(MCGS0008Obj.mcgsTime);
            bo.setMcgsTime(mcgsTime);
            String mcgsTimeMs = (String)temp.get(MCGS0008Obj.mcgsTimeMs);
            bo.setMcgsTimeMs(mcgsTimeMs);
            String mcgsCzz = (String)temp.get(MCGS0008Obj.mcgsCzz);
            bo.setMcgsCzz(mcgsCzz);
            String mcgsJxbh = (String)temp.get(MCGS0008Obj.mcgsJxbh);
            bo.setMcgsJxbh(mcgsJxbh);
            String mcgsFh = (String)temp.get(MCGS0008Obj.mcgsFh);
            bo.setMcgsFh(mcgsFh);
            String mcgsSch = (String)temp.get(MCGS0008Obj.mcgsSch);
            bo.setMcgsSch(mcgsSch);
            String mcgsFpf1 = (String)temp.get(MCGS0008Obj.mcgsFpf1);
            bo.setMcgsFpf1(mcgsFpf1);
            String mcgsFpf2 = (String)temp.get(MCGS0008Obj.mcgsFpf2);
            bo.setMcgsFpf2(mcgsFpf2);
            String mcgsFpf3 = (String)temp.get(MCGS0008Obj.mcgsFpf3);
            bo.setMcgsFpf3(mcgsFpf3);
            String mcgsFpf4 = (String)temp.get(MCGS0008Obj.mcgsFpf4);
            bo.setMcgsFpf4(mcgsFpf4);
            String mcgsFpf5 = (String)temp.get(MCGS0008Obj.mcgsFpf5);
            bo.setMcgsFpf5(mcgsFpf5);
            String mcgsFpf6 = (String)temp.get(MCGS0008Obj.mcgsFpf6);
            bo.setMcgsFpf6(mcgsFpf6);
            String mcgsFpf7 = (String)temp.get(MCGS0008Obj.mcgsFpf7);
            bo.setMcgsFpf7(mcgsFpf7);
            String mcgsFpf8 = (String)temp.get(MCGS0008Obj.mcgsFpf8);
            bo.setMcgsFpf8(mcgsFpf8);
            String mcgsFpf9 = (String)temp.get(MCGS0008Obj.mcgsFpf9);
            bo.setMcgsFpf9(mcgsFpf9);
            String mcgsFpf10 = (String)temp.get(MCGS0008Obj.mcgsFpf10);
            bo.setMcgsFpf10(mcgsFpf10);
            String mcgsFpf11 = (String)temp.get(MCGS0008Obj.mcgsFpf11);
            bo.setMcgsFpf11(mcgsFpf11);
            String mcgsFpf12 = (String)temp.get(MCGS0008Obj.mcgsFpf12);
            bo.setMcgsFpf12(mcgsFpf12);
            String mcgsFpf13 = (String)temp.get(MCGS0008Obj.mcgsFpf13);
            bo.setMcgsFpf13(mcgsFpf13);
            String mcgsFpf14 = (String)temp.get(MCGS0008Obj.mcgsFpf14);
            bo.setMcgsFpf14(mcgsFpf14);
            String mcgsFpf15 = (String)temp.get(MCGS0008Obj.mcgsFpf15);
            bo.setMcgsFpf15(mcgsFpf15);
            String mcgsFpf16 = (String)temp.get(MCGS0008Obj.mcgsFpf16);
            bo.setMcgsFpf16(mcgsFpf16);
            String mcgsFpf17 = (String)temp.get(MCGS0008Obj.mcgsFpf17);
            bo.setMcgsFpf17(mcgsFpf17);
            String mcgsFpf18 = (String)temp.get(MCGS0008Obj.mcgsFpf18);
            bo.setMcgsFpf18(mcgsFpf18);
            String mcgsFpf19 = (String)temp.get(MCGS0008Obj.mcgsFpf19);
            bo.setMcgsFpf19(mcgsFpf19);
            String mcgsFpf20 = (String)temp.get(MCGS0008Obj.mcgsFpf20);
            bo.setMcgsFpf20(mcgsFpf20);
            String mcgsFpf21 = (String)temp.get(MCGS0008Obj.mcgsFpf21);
            bo.setMcgsFpf21(mcgsFpf21);
            String mcgsBy1 = (String)temp.get(MCGS0008Obj.mcgsBy1);
            bo.setMcgsBy1(mcgsBy1);
            String mcgsZsch = (String)temp.get(MCGS0008Obj.mcgsZsch);
            bo.setMcgsZsch(mcgsZsch);
            String mcgsKzc = (String)temp.get(MCGS0008Obj.mcgsKzc);
            bo.setMcgsKzc(mcgsKzc);
            String mcgsBy4 = (String)temp.get(MCGS0008Obj.mcgsBy4);
            bo.setMcgsBy4(mcgsBy4);

            List<McgsFpfzVo> queryList = iMcgsFpfzService.queryList(bo);
            if(!CollectionUtils.isEmpty(queryList)){
                continue;
            }

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iMcgsFpfzService.insertByBo(bo);
        }
    }

    private void syncMCGS0007(HttpRequest post, String clientCode,String tempTableName) {
        if(!BrakeValueObj.MCGS_0007.equals(tempTableName)){
            return;
        }
        String maxMcgsTime = iMcgsFpf109ezService.getMaxMcgsTime();
        Map resultMap = post10003(post, tempTableName, maxMcgsTime);
        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            McgsFpf109ezBo bo = new McgsFpf109ezBo();

            String mcgsTime = (String)temp.get(MCGS0007Obj.mcgsTime);
            bo.setMcgsTime(mcgsTime);
            String mcgsTimeMs = (String)temp.get(MCGS0007Obj.mcgsTimeMs);
            bo.setMcgsTimeMs(mcgsTimeMs);
            String mcgsCzz = (String)temp.get(MCGS0007Obj.mcgsCzz);
            bo.setMcgsCzz(mcgsCzz);
            String mcgsJxbh = (String)temp.get(MCGS0007Obj.mcgsJxbh);
            bo.setMcgsJxbh(mcgsJxbh);
            String mcgsFh = (String)temp.get(MCGS0007Obj.mcgsFh);
            bo.setMcgsFh(mcgsFh);
            String mcgsSch = (String)temp.get(MCGS0007Obj.mcgsSch);
            bo.setMcgsSch(mcgsSch);
            String mcgsFpf1 = (String)temp.get(MCGS0007Obj.mcgsFpf1);
            bo.setMcgsFpf1(mcgsFpf1);
            String mcgsFpf2 = (String)temp.get(MCGS0007Obj.mcgsFpf2);
            bo.setMcgsFpf2(mcgsFpf2);
            String mcgsFpf3 = (String)temp.get(MCGS0007Obj.mcgsFpf3);
            bo.setMcgsFpf3(mcgsFpf3);
            String mcgsFpf4 = (String)temp.get(MCGS0007Obj.mcgsFpf4);
            bo.setMcgsFpf4(mcgsFpf4);
            String mcgsFpf5 = (String)temp.get(MCGS0007Obj.mcgsFpf5);
            bo.setMcgsFpf5(mcgsFpf5);
            String mcgsFpf6 = (String)temp.get(MCGS0007Obj.mcgsFpf6);
            bo.setMcgsFpf6(mcgsFpf6);
            String mcgsFpf7 = (String)temp.get(MCGS0007Obj.mcgsFpf7);
            bo.setMcgsFpf7(mcgsFpf7);
            String mcgsFpf8 = (String)temp.get(MCGS0007Obj.mcgsFpf8);
            bo.setMcgsFpf8(mcgsFpf8);
            String mcgsFpf9 = (String)temp.get(MCGS0007Obj.mcgsFpf9);
            bo.setMcgsFpf9(mcgsFpf9);
            String mcgsFpf10 = (String)temp.get(MCGS0007Obj.mcgsFpf10);
            bo.setMcgsFpf10(mcgsFpf10);
            String mcgsFpf11 = (String)temp.get(MCGS0007Obj.mcgsFpf11);
            bo.setMcgsFpf11(mcgsFpf11);
            String mcgsFpf12 = (String)temp.get(MCGS0007Obj.mcgsFpf12);
            bo.setMcgsFpf12(mcgsFpf12);
            String mcgsFpf13 = (String)temp.get(MCGS0007Obj.mcgsFpf13);
            bo.setMcgsFpf13(mcgsFpf13);
            String mcgsFpf14 = (String)temp.get(MCGS0007Obj.mcgsFpf14);
            bo.setMcgsFpf14(mcgsFpf14);
            String mcgsFpf15 = (String)temp.get(MCGS0007Obj.mcgsFpf15);
            bo.setMcgsFpf15(mcgsFpf15);
            String mcgsFpf16 = (String)temp.get(MCGS0007Obj.mcgsFpf16);
            bo.setMcgsFpf16(mcgsFpf16);
            String mcgsFpf17 = (String)temp.get(MCGS0007Obj.mcgsFpf17);
            bo.setMcgsFpf17(mcgsFpf17);
            String mcgsFpf18 = (String)temp.get(MCGS0007Obj.mcgsFpf18);
            bo.setMcgsFpf18(mcgsFpf18);
            String mcgsFpf19 = (String)temp.get(MCGS0007Obj.mcgsFpf19);
            bo.setMcgsFpf19(mcgsFpf19);
            String mcgsFpf20 = (String)temp.get(MCGS0007Obj.mcgsFpf20);
            bo.setMcgsFpf20(mcgsFpf20);
            String mcgsFpf21 = (String)temp.get(MCGS0007Obj.mcgsFpf21);
            bo.setMcgsFpf21(mcgsFpf21);
            String mcgsZsch = (String)temp.get(MCGS0007Obj.mcgsZsch);
            bo.setMcgsZsch(mcgsZsch);
            String mcgsKzc = (String)temp.get(MCGS0007Obj.mcgsKzc);
            bo.setMcgsKzc(mcgsKzc);

            List<McgsFpf109ezVo> queryList = iMcgsFpf109ezService.queryList(bo);
            if(!CollectionUtils.isEmpty(queryList)){
                continue;
            }

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iMcgsFpf109ezService.insertByBo(bo);
        }
    }

    private void syncMCGS0006(HttpRequest post, String clientCode,String tempTableName) {
        if(!BrakeValueObj.MCGS_0006.equals(tempTableName)){
            return;
        }
        String maxMcgsTime = iMcgsFpf109eJhbzService.getMaxMcgsTime();
        Map resultMap = post10003(post, tempTableName, maxMcgsTime);
        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            McgsFpf109eJhbzBo bo = new McgsFpf109eJhbzBo();

            String mcgsTime = (String)temp.get(MCGS0006Obj.mcgsTime);
            bo.setMcgsTime(mcgsTime);
            String mcgsTimeMs = (String)temp.get(MCGS0006Obj.mcgsTimeMs);
            bo.setMcgsTimeMs(mcgsTimeMs);
            String mcgsCzz = (String)temp.get(MCGS0006Obj.mcgsCzz);
            bo.setMcgsCzz(mcgsCzz);
            String mcgsJxbh = (String)temp.get(MCGS0006Obj.mcgsJxbh);
            bo.setMcgsJxbh(mcgsJxbh);
            String mcgsFh = (String)temp.get(MCGS0006Obj.mcgsFh);
            bo.setMcgsFh(mcgsFh);
            String mcgsSch = (String)temp.get(MCGS0006Obj.mcgsSch);
            bo.setMcgsSch(mcgsSch);
            String mcgsJhb109e1 = (String)temp.get(MCGS0006Obj.mcgsJhb109e1);
            bo.setMcgsJhb109e1(mcgsJhb109e1);
            String mcgsJhb109e2 = (String)temp.get(MCGS0006Obj.mcgsJhb109e2);
            bo.setMcgsJhb109e2(mcgsJhb109e2);
            String mcgsJhb109e3 = (String)temp.get(MCGS0006Obj.mcgsJhb109e3);
            bo.setMcgsJhb109e3(mcgsJhb109e3);
            String mcgsJhb109e4 = (String)temp.get(MCGS0006Obj.mcgsJhb109e4);
            bo.setMcgsJhb109e4(mcgsJhb109e4);
            String mcgsJhb109e5 = (String)temp.get(MCGS0006Obj.mcgsJhb109e5);
            bo.setMcgsJhb109e5(mcgsJhb109e5);
            String mcgsJhb109e6 = (String)temp.get(MCGS0006Obj.mcgsJhb109e6);
            bo.setMcgsJhb109e6(mcgsJhb109e6);
            String mcgsKzc = (String)temp.get(MCGS0006Obj.mcgsKzc);
            bo.setMcgsKzc(mcgsKzc);
            String mcgsZsch = (String)temp.get(MCGS0006Obj.mcgsZsch);
            bo.setMcgsZsch(mcgsZsch);
            String mcgsBy1 = (String)temp.get(MCGS0006Obj.mcgsBy1);
            bo.setMcgsBy1(mcgsBy1);

            List<McgsFpf109eJhbzVo> queryList = iMcgsFpf109eJhbzService.queryList(bo);
            if(!CollectionUtils.isEmpty(queryList)){
                continue;
            }

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iMcgsFpf109eJhbzService.insertByBo(bo);
        }
    }

    private void syncMCGS0005(HttpRequest post, String clientCode,String tempTableName) {
        if(!BrakeValueObj.MCGS_0005.equals(tempTableName)){
            return;
        }
        String maxMcgsTime = iMcgsFpf109eZybzService.getMaxMcgsTime();
        Map resultMap = post10003(post, tempTableName, maxMcgsTime);
        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            McgsFpf109eZybzBo bo = new McgsFpf109eZybzBo();

            String mcgsTime = (String)temp.get(MCGS0005Obj.mcgsTime);
            bo.setMcgsTime(mcgsTime);
            String mcgsTimeMs = (String)temp.get(MCGS0005Obj.mcgsTimeMs);
            bo.setMcgsTimeMs(mcgsTimeMs);
            String mcgsCzz = (String)temp.get(MCGS0005Obj.mcgsCzz);
            bo.setMcgsCzz(mcgsCzz);
            String mcgsJxbh = (String)temp.get(MCGS0005Obj.mcgsJxbh);
            bo.setMcgsJxbh(mcgsJxbh);
            String mcgsFh = (String)temp.get(MCGS0005Obj.mcgsFh);
            bo.setMcgsFh(mcgsFh);
            String mcgsSch = (String)temp.get(MCGS0005Obj.mcgsSch);
            bo.setMcgsSch(mcgsSch);
            String mcgsFpf1 = (String)temp.get(MCGS0005Obj.mcgsFpf1);
            bo.setMcgsFpf1(mcgsFpf1);
            String mcgsFpf2 = (String)temp.get(MCGS0005Obj.mcgsFpf2);
            bo.setMcgsFpf2(mcgsFpf2);
            String mcgsFpf3 = (String)temp.get(MCGS0005Obj.mcgsFpf3);
            bo.setMcgsFpf3(mcgsFpf3);
            String mcgsFpf4 = (String)temp.get(MCGS0005Obj.mcgsFpf4);
            bo.setMcgsFpf4(mcgsFpf4);
            String mcgsFpf5 = (String)temp.get(MCGS0005Obj.mcgsFpf5);
            bo.setMcgsFpf5(mcgsFpf5);
            String mcgsFpf6 = (String)temp.get(MCGS0005Obj.mcgsFpf6);
            bo.setMcgsFpf6(mcgsFpf6);
            String mcgsFpf7 = (String)temp.get(MCGS0005Obj.mcgsFpf7);
            bo.setMcgsFpf7(mcgsFpf7);
            String mcgsFpf8 = (String)temp.get(MCGS0005Obj.mcgsFpf8);
            bo.setMcgsFpf8(mcgsFpf8);
            String mcgsFpf9 = (String)temp.get(MCGS0005Obj.mcgsFpf9);
            bo.setMcgsFpf9(mcgsFpf9);
            String mcgsFpf10 = (String)temp.get(MCGS0005Obj.mcgsFpf10);
            bo.setMcgsFpf10(mcgsFpf10);
            String mcgsFpf11 = (String)temp.get(MCGS0005Obj.mcgsFpf11);
            bo.setMcgsFpf11(mcgsFpf11);
            String mcgsFpf12 = (String)temp.get(MCGS0005Obj.mcgsFpf12);
            bo.setMcgsFpf12(mcgsFpf12);
            String mcgsFpf13 = (String)temp.get(MCGS0005Obj.mcgsFpf13);
            bo.setMcgsFpf13(mcgsFpf13);
            String mcgsFpf14 = (String)temp.get(MCGS0005Obj.mcgsFpf14);
            bo.setMcgsFpf14(mcgsFpf14);
            String mcgsFpf15 = (String)temp.get(MCGS0005Obj.mcgsFpf15);
            bo.setMcgsFpf15(mcgsFpf15);
            String mcgsFpf16 = (String)temp.get(MCGS0005Obj.mcgsFpf16);
            bo.setMcgsFpf16(mcgsFpf16);
            String mcgsFpf17 = (String)temp.get(MCGS0005Obj.mcgsFpf17);
            bo.setMcgsFpf17(mcgsFpf17);
            String mcgsFpf18 = (String)temp.get(MCGS0005Obj.mcgsFpf18);
            bo.setMcgsFpf18(mcgsFpf18);
            String mcgsFpf19 = (String)temp.get(MCGS0005Obj.mcgsFpf19);
            bo.setMcgsFpf19(mcgsFpf19);
            String mcgsFpf20 = (String)temp.get(MCGS0005Obj.mcgsFpf20);
            bo.setMcgsFpf20(mcgsFpf20);
            String mcgsFpf21 = (String)temp.get(MCGS0005Obj.mcgsFpf21);
            bo.setMcgsFpf21(mcgsFpf21);
            String mcgsBy1 = (String)temp.get(MCGS0005Obj.mcgsBy1);
            bo.setMcgsBy1(mcgsBy1);
            String mcgsZsch = (String)temp.get(MCGS0005Obj.mcgsZsch);
            bo.setMcgsZsch(mcgsZsch);
            String mcgsKzc = (String)temp.get(MCGS0005Obj.mcgsKzc);
            bo.setMcgsKzc(mcgsKzc);

            List<McgsFpf109eZybzVo> queryList = iMcgsFpf109eZybzService.queryList(bo);
            if(!CollectionUtils.isEmpty(queryList)){
                continue;
            }

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iMcgsFpf109eZybzService.insertByBo(bo);
        }
    }

    private void syncMCGS0004(HttpRequest post, String clientCode, String tempTableName) {
        if(!BrakeValueObj.MCGS_0004.equals(tempTableName)){
            return;
        }
        String maxMcgsTime = iMcgsZjfzService.getMaxMcgsTime();
        Map resultMap = post10003(post, tempTableName, maxMcgsTime);
        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            McgsZjfzBo bo = new McgsZjfzBo();

            String mcgsTime = (String)temp.get(MCGS0004Obj.mcgsTime);
            bo.setMcgsTime(mcgsTime);
            String mcgsTimeMs = (String)temp.get(MCGS0004Obj.mcgsTimeMs);
            bo.setMcgsTimeMs(mcgsTimeMs);
            String mcgsCzz = (String)temp.get(MCGS0004Obj.mcgsCzz);
            bo.setMcgsCzz(mcgsCzz);
            String mcgsJxbh = (String)temp.get(MCGS0004Obj.mcgsJxbh);
            bo.setMcgsJxbh(mcgsJxbh);
            String mcgsFh = (String)temp.get(MCGS0004Obj.mcgsFh);
            bo.setMcgsFh(mcgsFh);
            String mcgsSch = (String)temp.get(MCGS0004Obj.mcgsSch);
            bo.setMcgsSch(mcgsSch);
            String mcgsZjf1 = (String)temp.get(MCGS0004Obj.mcgsZjf1);
            bo.setMcgsZjf1(mcgsZjf1);
            String mcgsZjf2 = (String)temp.get(MCGS0004Obj.mcgsZjf2);
            bo.setMcgsZjf2(mcgsZjf2);
            String mcgsZjf3 = (String)temp.get(MCGS0004Obj.mcgsZjf3);
            bo.setMcgsZjf3(mcgsZjf3);
            String mcgsZjf4 = (String)temp.get(MCGS0004Obj.mcgsZjf4);
            bo.setMcgsZjf4(mcgsZjf4);
            String mcgsZjf5 = (String)temp.get(MCGS0004Obj.mcgsZjf5);
            bo.setMcgsZjf5(mcgsZjf5);
            String mcgsZjf6 = (String)temp.get(MCGS0004Obj.mcgsZjf6);
            bo.setMcgsZjf6(mcgsZjf6);
            String mcgsZjf7 = (String)temp.get(MCGS0004Obj.mcgsZjf7);
            bo.setMcgsZjf7(mcgsZjf7);
            String mcgsZjf8 = (String)temp.get(MCGS0004Obj.mcgsZjf8);
            bo.setMcgsZjf8(mcgsZjf8);
            String mcgsZjf9 = (String)temp.get(MCGS0004Obj.mcgsZjf9);
            bo.setMcgsZjf9(mcgsZjf9);
            String mcgsZjf10 = (String)temp.get(MCGS0004Obj.mcgsZjf10);
            bo.setMcgsZjf10(mcgsZjf10);
            String mcgsZjf11 = (String)temp.get(MCGS0004Obj.mcgsZjf11);
            bo.setMcgsZjf11(mcgsZjf11);
            String mcgsZjf12 = (String)temp.get(MCGS0004Obj.mcgsZjf12);
            bo.setMcgsZjf12(mcgsZjf12);
            String mcgsZjf13 = (String)temp.get(MCGS0004Obj.mcgsZjf13);
            bo.setMcgsZjf13(mcgsZjf13);
            String mcgsZjf14 = (String)temp.get(MCGS0004Obj.mcgsZjf14);
            bo.setMcgsZjf14(mcgsZjf14);
            String mcgsBy1 = (String)temp.get(MCGS0004Obj.mcgsBy1);
            bo.setMcgsBy1(mcgsBy1);
            String mcgsZsch = (String)temp.get(MCGS0004Obj.mcgsZsch);
            bo.setMcgsZsch(mcgsZsch);

            List<McgsZjfzVo> queryList = iMcgsZjfzService.queryList(bo);
            if(!CollectionUtils.isEmpty(queryList)){
                continue;
            }

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iMcgsZjfzService.insertByBo(bo);
        }
    }

    private void syncMCGS0003(HttpRequest post, String clientCode,String tempTableName) {
        if(!BrakeValueObj.MCGS_0003.equals(tempTableName)){
            return;
        }
        String maxMcgsTime = iMcgsQk1QkfzService.getMaxMcgsTime();
        Map resultMap = post10003(post, tempTableName, maxMcgsTime);
        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            McgsQk1QkfzBo bo = new McgsQk1QkfzBo();

            String mcgsTime = (String)temp.get(MCGS0003Obj.mcgsTime);
            bo.setMcgsTime(mcgsTime);
            String mcgsTimeMs = (String)temp.get(MCGS0003Obj.mcgsTimeMs);
            bo.setMcgsTimeMs(mcgsTimeMs);
            String mcgsCzz = (String)temp.get(MCGS0003Obj.mcgsCzz);
            bo.setMcgsCzz(mcgsCzz);
            String mcgsJxbh = (String)temp.get(MCGS0003Obj.mcgsJxbh);
            bo.setMcgsJxbh(mcgsJxbh);
            String mcgsFh = (String)temp.get(MCGS0003Obj.mcgsFh);
            bo.setMcgsFh(mcgsFh);
            String mcgsSch = (String)temp.get(MCGS0003Obj.mcgsSch);
            bo.setMcgsSch(mcgsSch);
            String mcgsZdf1 = (String)temp.get(MCGS0003Obj.mcgsZdf1);
            bo.setMcgsZdf1(mcgsZdf1);
            String mcgsZdf2 = (String)temp.get(MCGS0003Obj.mcgsZdf2);
            bo.setMcgsZdf2(mcgsZdf2);
            String mcgsZdf3 = (String)temp.get(MCGS0003Obj.mcgsZdf3);
            bo.setMcgsZdf3(mcgsZdf3);
            String mcgsBy1 = (String)temp.get(MCGS0003Obj.mcgsBy1);
            bo.setMcgsBy1(mcgsBy1);
            String mcgsZsch = (String)temp.get(MCGS0003Obj.mcgsZsch);
            bo.setMcgsZsch(mcgsZsch);
            String mcgsZdf4 = (String)temp.get(MCGS0003Obj.mcgsZdf4);
            bo.setMcgsZdf4(mcgsZdf4);
            String mcgsJxbhsr = (String)temp.get(MCGS0003Obj.mcgsJxbhsr);
            bo.setMcgsJxbhsr(mcgsJxbhsr);

            List<McgsQk1QkfzVo> queryList = iMcgsQk1QkfzService.queryList(bo);
            if(!CollectionUtils.isEmpty(queryList)){
                continue;
            }

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iMcgsQk1QkfzService.insertByBo(bo);
        }
    }

    private void syncMCGS0002(HttpRequest post, String clientCode,String tempTableName) {
        if(!BrakeValueObj.MCGS_0002.equals(tempTableName)){
            return;
        }
        String maxMcgsTime = iMcgsQj1QdjczService.getMaxMcgsTime();
        Map resultMap = post10003(post, tempTableName, maxMcgsTime);
        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            McgsQj1QdjczBo bo = new McgsQj1QdjczBo();

            String mcgsTime = (String)temp.get(MCGS0002Obj.mcgsTime);
            bo.setMcgsTime(mcgsTime);
            String mcgsTimeMs = (String)temp.get(MCGS0002Obj.mcgsTimeMs);
            bo.setMcgsTimeMs(mcgsTimeMs);
            String mcgsJxbh = (String)temp.get(MCGS0002Obj.mcgsJxbh);
            bo.setMcgsJxbh(mcgsJxbh);
            String mcgsCzz = (String)temp.get(MCGS0002Obj.mcgsCzz);
            bo.setMcgsCzz(mcgsCzz);
            String mcgsZsch = (String)temp.get(MCGS0002Obj.mcgsZsch);
            bo.setMcgsZsch(mcgsZsch);
            String mcgsQj11 = (String)temp.get(MCGS0002Obj.mcgsQj11);
            bo.setMcgsQj11(mcgsQj11);
            String mcgsQj12 = (String)temp.get(MCGS0002Obj.mcgsQj12);
            bo.setMcgsQj12(mcgsQj12);
            String mcgsQj13 = (String)temp.get(MCGS0002Obj.mcgsQj13);
            bo.setMcgsQj13(mcgsQj13);
            String mcgsQj14 = (String)temp.get(MCGS0002Obj.mcgsQj14);
            bo.setMcgsQj14(mcgsQj14);
            String mcgsQj15 = (String)temp.get(MCGS0002Obj.mcgsQj15);
            bo.setMcgsQj15(mcgsQj15);
            String mcgsSch = (String)temp.get(MCGS0002Obj.mcgsSch);
            bo.setMcgsSch(mcgsSch);
            String mcgsBy1 = (String)temp.get(MCGS0002Obj.mcgsBy1);
            bo.setMcgsBy1(mcgsBy1);

            List<McgsQj1QdjczVo> queryList = iMcgsQj1QdjczService.queryList(bo);
            if(!CollectionUtils.isEmpty(queryList)){
                continue;
            }

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iMcgsQj1QdjczService.insertByBo(bo);
        }
    }

    private void syncMCGS0001(HttpRequest post, String clientCode,String tempTableName) {
        if(!BrakeValueObj.MCGS_0001.equals(tempTableName)){
            return;
        }
        Map resultMap = post10003(post, tempTableName, null);
        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            McgsAlarmInfoBo bo = new McgsAlarmInfoBo();
            String mcgsAlarmId = (String)temp.get(MCGS0001Obj.mcgsAlarmId);
            bo.setMcgsAlarmId(mcgsAlarmId);
            String mcgsAlmName = (String)temp.get(MCGS0001Obj.mcgsAlmName);
            bo.setMcgsAlarmId(mcgsAlmName);
            String mcgsTimeS = (String)temp.get(MCGS0001Obj.mcgsTimeS);
            bo.setMcgsAlarmId(mcgsTimeS);
            String mcgsTimeSms = (String)temp.get(MCGS0001Obj.mcgsTimeSms);
            bo.setMcgsTimeSms(mcgsTimeSms);
            String mcgsTimeE = (String)temp.get(MCGS0001Obj.mcgsTimeE);
            bo.setMcgsTimeE(mcgsTimeE);
            String mcgsTimeEms = (String)temp.get(MCGS0001Obj.mcgsTimeEms);
            bo.setMcgsTimeEms(mcgsTimeEms);
            String mcgsTimeA = (String)temp.get(MCGS0001Obj.mcgsTimeA);
            bo.setMcgsTimeA(mcgsTimeA);
            String mcgsTimeAms = (String)temp.get(MCGS0001Obj.mcgsTimeAms);
            bo.setMcgsTimeAms(mcgsTimeAms);
            String mcgsId = (String)temp.get(MCGS0001Obj.mcgsId);
            bo.setMcgsId(mcgsId);
            String mcgsType = (String)temp.get(MCGS0001Obj.mcgsType);
            bo.setMcgsType(mcgsType);
            String mcgsLimitValue = (String)temp.get(MCGS0001Obj.mcgsLimitValue);
            bo.setMcgsLimitValue(mcgsLimitValue);
            String mcgsStandValue = (String)temp.get(MCGS0001Obj.mcgsStandValue);
            bo.setMcgsStandValue(mcgsStandValue);
            String mcgsInfo = (String)temp.get(MCGS0001Obj.mcgsInfo);
            bo.setMcgsInfo(mcgsInfo);

            List<McgsAlarmInfoVo> queryList = iMcgsAlarmInfoService.queryList(bo);
            if(!CollectionUtils.isEmpty(queryList)){
                continue;
            }

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iMcgsAlarmInfoService.insertByBo(bo);
        }
    }

    private void syncMCGS0000(HttpRequest post, String clientCode,String tempTableName) {
        if(!BrakeValueObj.MCGS_0000.equals(tempTableName)){
            return;
        }
        String maxMcgsTime = iMcgsInfoService.getMaxMcgsTime();
        Map resultMap = post10003(post, tempTableName, maxMcgsTime);
        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            McgsInfoBo bo = new McgsInfoBo();
            String mcgsTime = (String)temp.get(MCGS0000Obj.mcgsTime);
            bo.setMcgsTime(mcgsTime);
            String mcgsJxbh = (String)temp.get(MCGS0000Obj.mcgsJxbh);
            bo.setMcgsJxbh(mcgsJxbh);
            String mcgsCzz = (String)temp.get(MCGS0000Obj.mcgsCzz);
            bo.setMcgsCzz(mcgsCzz);
            String mcgsZsch = (String)temp.get(MCGS0000Obj.mcgsZsch);
            bo.setMcgsZsch(mcgsZsch);
            String mcgsQj11 = (String)temp.get(MCGS0000Obj.mcgsQj11);
            bo.setMcgsQj11(mcgsQj11);
            String mcgsQj12 = (String)temp.get(MCGS0000Obj.mcgsQj12);
            bo.setMcgsQj12(mcgsQj12);
            String mcgsQj13 = (String)temp.get(MCGS0000Obj.mcgsQj13);
            bo.setMcgsQj13(mcgsQj13);
            String mcgsQj14 = (String)temp.get(MCGS0000Obj.mcgsQj14);
            bo.setMcgsQj14(mcgsQj14);
            String mcgsQj15 = (String)temp.get(MCGS0000Obj.mcgsQj15);
            bo.setMcgsQj15(mcgsQj15);
            String mcgsSch = (String)temp.get(MCGS0000Obj.mcgsSch);
            bo.setMcgsSch(mcgsSch);
            String mcgsBy1 = (String)temp.get(MCGS0000Obj.mcgsBy1);
            bo.setMcgsBy1(mcgsBy1);
            String mcgsFpf1 = (String)temp.get(MCGS0000Obj.mcgsFpf1);
            bo.setMcgsFpf1(mcgsFpf1);
            String mcgsFpf2 = (String)temp.get(MCGS0000Obj.mcgsFpf2);
            bo.setMcgsFpf2(mcgsFpf2);
            String mcgsFpf3 = (String)temp.get(MCGS0000Obj.mcgsFpf3);
            bo.setMcgsFpf3(mcgsFpf3);
            String mcgsFpf4 = (String)temp.get(MCGS0000Obj.mcgsFpf4);
            bo.setMcgsFpf4(mcgsFpf4);
            String mcgsFpf5 = (String)temp.get(MCGS0000Obj.mcgsFpf5);
            bo.setMcgsFpf5(mcgsFpf5);
            String mcgsFpf6 = (String)temp.get(MCGS0000Obj.mcgsFpf6);
            bo.setMcgsFpf6(mcgsFpf6);
            String mcgsFpf7 = (String)temp.get(MCGS0000Obj.mcgsFpf7);
            bo.setMcgsFpf7(mcgsFpf7);
            String mcgsFpf8 = (String)temp.get(MCGS0000Obj.mcgsFpf8);
            bo.setMcgsFpf8(mcgsFpf8);
            String mcgsFpf9 = (String)temp.get(MCGS0000Obj.mcgsFpf9);
            bo.setMcgsFpf9(mcgsFpf9);
            String mcgsFpf10 = (String)temp.get(MCGS0000Obj.mcgsFpf10);
            bo.setMcgsFpf10(mcgsFpf10);
            String mcgsFpf11 = (String)temp.get(MCGS0000Obj.mcgsFpf11);
            bo.setMcgsFpf11(mcgsFpf11);
            String mcgsFpf12 = (String)temp.get(MCGS0000Obj.mcgsFpf12);
            bo.setMcgsFpf12(mcgsFpf12);
            String mcgsFpf13 = (String)temp.get(MCGS0000Obj.mcgsFpf13);
            bo.setMcgsFpf13(mcgsFpf13);
            String mcgsFpf14 = (String)temp.get(MCGS0000Obj.mcgsFpf14);
            bo.setMcgsFpf14(mcgsFpf14);
            String mcgsFpf15 = (String)temp.get(MCGS0000Obj.mcgsFpf15);
            bo.setMcgsFpf15(mcgsFpf15);
            String mcgsFpf16 = (String)temp.get(MCGS0000Obj.mcgsFpf16);
            bo.setMcgsFpf16(mcgsFpf16);
            String mcgsFpf17 = (String)temp.get(MCGS0000Obj.mcgsFpf17);
            bo.setMcgsFpf17(mcgsFpf17);
            String mcgsFpf18 = (String)temp.get(MCGS0000Obj.mcgsFpf18);
            bo.setMcgsFpf18(mcgsFpf18);
            String mcgsFpf19 = (String)temp.get(MCGS0000Obj.mcgsFpf19);
            bo.setMcgsFpf19(mcgsFpf19);
            String mcgsFpf20 = (String)temp.get(MCGS0000Obj.mcgsFpf20);
            bo.setMcgsFpf20(mcgsFpf20);
            String mcgsFpf21 = (String)temp.get(MCGS0000Obj.mcgsFpf21);
            bo.setMcgsFpf21(mcgsFpf21);
            String mcgsKzc = (String)temp.get(MCGS0000Obj.mcgsKzc);
            bo.setMcgsKzc(mcgsKzc);
            String mcgsXz1 = (String)temp.get(MCGS0000Obj.mcgsXz1);
            bo.setMcgsXz1(mcgsXz1);
            String mcgsXz2 = (String)temp.get(MCGS0000Obj.mcgsXz2);
            bo.setMcgsXz20(mcgsXz2);
            String mcgsXz3 = (String)temp.get(MCGS0000Obj.mcgsXz3);
            bo.setMcgsXz3(mcgsXz3);
            String mcgsXz4 = (String)temp.get(MCGS0000Obj.mcgsXz4);
            bo.setMcgsXz4(mcgsXz4);
            String mcgsXz5 = (String)temp.get(MCGS0000Obj.mcgsXz5);
            bo.setMcgsXz5(mcgsXz5);
            String mcgsXz6 = (String)temp.get(MCGS0000Obj.mcgsXz6);
            bo.setMcgsXz6(mcgsXz6);
            String mcgsXz7 = (String)temp.get(MCGS0000Obj.mcgsXz7);
            bo.setMcgsXz7(mcgsXz7);
            String mcgsXz8 = (String)temp.get(MCGS0000Obj.mcgsXz8);
            bo.setMcgsXz8(mcgsXz8);
            String mcgsXz9 = (String)temp.get(MCGS0000Obj.mcgsXz9);
            bo.setMcgsXz9(mcgsXz9);
            String mcgsXz10 = (String)temp.get(MCGS0000Obj.mcgsXz10);
            bo.setMcgsXz10(mcgsXz10);
            String mcgsXz11 = (String)temp.get(MCGS0000Obj.mcgsXz11);
            bo.setMcgsXz11(mcgsXz11);
            String mcgsXz12 = (String)temp.get(MCGS0000Obj.mcgsXz12);
            bo.setMcgsXz12(mcgsXz12);
            String mcgsXz13 = (String)temp.get(MCGS0000Obj.mcgsXz13);
            bo.setMcgsXz13(mcgsXz13);
            String mcgsXz14 = (String)temp.get(MCGS0000Obj.mcgsXz14);
            bo.setMcgsXz14(mcgsXz14);
            String mcgsXz15 = (String)temp.get(MCGS0000Obj.mcgsXz15);
            bo.setMcgsXz15(mcgsXz15);
            String mcgsXz16 = (String)temp.get(MCGS0000Obj.mcgsXz16);
            bo.setMcgsXz16(mcgsXz16);
            String mcgsXz17 = (String)temp.get(MCGS0000Obj.mcgsXz17);
            bo.setMcgsXz17(mcgsXz17);
            String mcgsXz18 = (String)temp.get(MCGS0000Obj.mcgsXz18);
            bo.setMcgsXz18(mcgsXz18);
            String mcgsXz19 = (String)temp.get(MCGS0000Obj.mcgsXz19);
            bo.setMcgsXz19(mcgsXz19);
            String mcgsXljc = (String)temp.get(MCGS0000Obj.mcgsXljc);
            bo.setMcgsXljc(mcgsXljc);
            String mcgsXz20 = (String)temp.get(MCGS0000Obj.mcgsXz20);
            bo.setMcgsXz20(mcgsXz20);
            String mcgsJhb109e1 = (String)temp.get(MCGS0000Obj.mcgsJhb109e1);
            bo.setMcgsJhb109e1(mcgsJhb109e1);
            String mcgsJhb109e2 = (String)temp.get(MCGS0000Obj.mcgsJhb109e2);
            bo.setMcgsJhb109e2(mcgsJhb109e2);
            String mcgsJhb109e3 = (String)temp.get(MCGS0000Obj.mcgsJhb109e3);
            bo.setMcgsJhb109e3(mcgsJhb109e3);
            String mcgsJhb109e4 = (String)temp.get(MCGS0000Obj.mcgsJhb109e4);
            bo.setMcgsJhb109e4(mcgsJhb109e4);
            String mcgsJhb109e5 = (String)temp.get(MCGS0000Obj.mcgsJhb109e5);
            bo.setMcgsJhb109e5(mcgsJhb109e5);
            String mcgsJhb109e6 = (String)temp.get(MCGS0000Obj.mcgsJhb109e6);
            bo.setMcgsJhb109e6(mcgsJhb109e6);

            List<McgsInfoVo> queryList = iMcgsInfoService.queryList(bo);
            if(!CollectionUtils.isEmpty(queryList)){
                continue;
            }

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iMcgsInfoService.insertByBo(bo);
        }
    }

    private void syncPass(HttpRequest post, String clientCode,String tempTableName) {
        if(!DamperObj.PASS.equals(tempTableName)){
            return;
        }
        Long maxDrID = iDrPassService.getMaxDrID();
        Map resultMap = post10002(post, tempTableName, maxDrID);

        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            DrPassBo bo = new DrPassBo();
            String drId = (String)temp.get(PassObj.ID);
            bo.setDrId(Long.valueOf(drId));
            String drPassWord = (String)temp.get(PassObj.PassWord);
            bo.setDrPassWord(drPassWord);

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iDrPassService.insertByBo(bo);
        }
    }

    private void syncOperator(HttpRequest post, String clientCode,String tempTableName) {
        if(!DamperObj.OPERATOR.equals(tempTableName)){
            return;
        }
        Long maxDrID = iDrOperatorService.getMaxDrID();
        Map resultMap = post10002(post, tempTableName, maxDrID);

        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            DrOperatorBo bo = new DrOperatorBo();
            String drId = (String)temp.get(OperatorObj.ID);
            bo.setDrId(Long.valueOf(drId));
            String drOperatorName = (String)temp.get(OperatorObj.OperatorName);
            bo.setDrOperatorName(drOperatorName);

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iDrOperatorService.insertByBo(bo);
        }
    }

    private void syncMultiVset(HttpRequest post, String clientCode,String tempTableName) {
        if(!DamperObj.MULTIVSET.equals(tempTableName)){
            return;
        }
        Long maxDrID = iDrMultiVsetService.getMaxDrID();
        Map resultMap = post10002(post, tempTableName, maxDrID);

        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            DrMultiVsetBo bo = new DrMultiVsetBo();

            String drId = (String)temp.get(MultiVsetObj.ID);
            bo.setDrId(Long.valueOf(drId));
            String drDamperType = (String)temp.get(MultiVsetObj.DamperType);
            bo.setDrDamperType(drDamperType);
            String drVelocitySet0 = (String)temp.get(MultiVsetObj.VelocitySet0);
            bo.setDrVelocitySet0(drVelocitySet0);
            String drForceTSet0 = (String)temp.get(MultiVsetObj.ForceTSet0);
            bo.setDrForceTSet0(drForceTSet0);
            String drForcePSet0 = (String)temp.get(MultiVsetObj.ForcePSet0);
            bo.setDrForcePSet0(drForcePSet0);
            String drErrPSet0 = (String)temp.get(MultiVsetObj.ErrPSet0);
            bo.setDrErrPSet0(drErrPSet0);
            String drErrNSet0 = (String)temp.get(MultiVsetObj.ErrNSet0);
            bo.setDrErrNSet0(drErrNSet0);
            String drDissymmetrySet0 = (String)temp.get(MultiVsetObj.DissymmetrySet0);
            bo.setDrDissymmetrySet0(drDissymmetrySet0);
            String drVelocitySet1 = (String)temp.get(MultiVsetObj.VelocitySet1);
            bo.setDrVelocitySet1(drVelocitySet1);
            String drForceTSet1 = (String)temp.get(MultiVsetObj.ForceTSet1);
            bo.setDrForceTSet1(drForceTSet1);
            String drForcePSet1 = (String)temp.get(MultiVsetObj.ForcePSet1);
            bo.setDrForcePSet1(drForcePSet1);
            String drErrPSet1 = (String)temp.get(MultiVsetObj.ErrPSet1);
            bo.setDrErrPSet1(drErrPSet1);
            String drErrNSet1 = (String)temp.get(MultiVsetObj.ErrNSet1);
            bo.setDrErrNSet1(drErrNSet1);
            String drDissymmetrySet1 = (String)temp.get(MultiVsetObj.DissymmetrySet1);
            bo.setDrDissymmetrySet1(drDissymmetrySet1);
            String drVelocitySet2 = (String)temp.get(MultiVsetObj.VelocitySet2);
            bo.setDrVelocitySet2(drVelocitySet2);
            String drForceTSet2 = (String)temp.get(MultiVsetObj.ForceTSet2);
            bo.setDrForceTSet2(drForceTSet2);
            String drForcePSet2 = (String)temp.get(MultiVsetObj.ForcePSet2);
            bo.setDrForcePSet2(drForcePSet2);
            String drErrPSet2 = (String)temp.get(MultiVsetObj.ErrPSet2);
            bo.setDrErrPSet2(drErrPSet2);
            String drErrNSet2 = (String)temp.get(MultiVsetObj.ErrNSet2);
            bo.setDrErrNSet2(drErrNSet2);
            String drDissymmetrySet2 = (String)temp.get(MultiVsetObj.DissymmetrySet2);
            bo.setDrDissymmetrySet2(drDissymmetrySet2);
            String drVelocitySet3 = (String)temp.get(MultiVsetObj.VelocitySet3);
            bo.setDrVelocitySet3(drVelocitySet3);
            String drForceTSet3 = (String)temp.get(MultiVsetObj.ForceTSet3);
            bo.setDrForceTSet3(drForceTSet3);
            String drForcePSet3 = (String)temp.get(MultiVsetObj.ForcePSet3);
            bo.setDrForcePSet3(drForcePSet3);
            String drErrPSet3 = (String)temp.get(MultiVsetObj.ErrPSet3);
            bo.setDrErrPSet3(drErrPSet3);
            String drErrNSet3 = (String)temp.get(MultiVsetObj.ErrNSet3);
            bo.setDrErrNSet3(drErrNSet3);
            String drVelocitySet4 = (String)temp.get(MultiVsetObj.VelocitySet4);
            bo.setDrVelocitySet4(drVelocitySet4);
            String drForceTSet4 = (String)temp.get(MultiVsetObj.ForceTSet4);
            bo.setDrForceTSet4(drForceTSet4);
            String drForcePSet4 = (String)temp.get(MultiVsetObj.ForcePSet4);
            bo.setDrForcePSet4(drForcePSet4);
            String drErrPSet4 = (String)temp.get(MultiVsetObj.ErrPSet4);
            bo.setDrErrPSet4(drErrPSet4);
            String drErrNSet4 = (String)temp.get(MultiVsetObj.ErrNSet4);
            bo.setDrErrNSet4(drErrNSet4);
            String drDissymmetrySet4 = (String)temp.get(MultiVsetObj.DissymmetrySet4);
            bo.setDrDissymmetrySet4(drDissymmetrySet4);

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iDrMultiVsetService.insertByBo(bo);
        }
    }

    private void syncMonoVset(HttpRequest post, String clientCode,String tempTableName) {
        if(!DamperObj.MONOVSET.equals(tempTableName)){
            return;
        }

        Long maxDrID = iDrMonoVsetService.getMaxDrID();
        Map resultMap = post10002(post, tempTableName, maxDrID);

        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            DrMonoVsetBo bo = new DrMonoVsetBo();
            String drId = (String)temp.get(MonoVsetObj.ID);
            bo.setDrId(Long.valueOf(drId));
            String drDamperType = (String)temp.get(MonoVsetObj.DamperType);
            bo.setDrDamperType(drDamperType);
            String drVelocitySet = (String)temp.get(MonoVsetObj.VelocitySet);
            bo.setDrVelocitySet(drVelocitySet);
            String drForceTensionSet = (String)temp.get(MonoVsetObj.ForceTensionSet);
            bo.setDrForceTensionSet(drForceTensionSet);
            String drForcePressSet = (String)temp.get(MonoVsetObj.ForcePressSet);
            bo.setDrForcePressSet(drForcePressSet);
            String drErrPset = (String)temp.get(MonoVsetObj.ErrPset);
            bo.setDrErrPset(drErrPset);
            String drErrNset = (String)temp.get(MonoVsetObj.ErrNset);
            bo.setDrErrNset(drErrNset);
            String drDissymmetrySet = (String)temp.get(MonoVsetObj.DissymmetrySet);
            bo.setDrDissymmetrySet(drDissymmetrySet);

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iDrMonoVsetService.insertByBo(bo);
        }
    }

    private void syncInterface(HttpRequest post, String clientCode,String tempTableName) {
        if(!DamperObj.INTERFACE.equals(tempTableName)){
            return;
        }

        Long maxDrID = iDrInterfaceService.getMaxDrID();
        Map resultMap = post10002(post, tempTableName, maxDrID);

        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            DrInterfaceBo bo = new DrInterfaceBo();
            String drId = (String)temp.get(DrInterfaceObj.ID);
            bo.setDrId(Long.valueOf(drId));
            String drDispCorrect = (String)temp.get(DrInterfaceObj.dispCorrect);
            bo.setDrDispCorrect(drDispCorrect);
            String drDispZero = (String)temp.get(DrInterfaceObj.dispZero);
            bo.setDrDispZero(drDispZero);
            String drForceCorrect1 = (String)temp.get(DrInterfaceObj.forceCorrect1);
            bo.setDrForceCorrect1(drForceCorrect1);
            String drForceZero1 = (String)temp.get(DrInterfaceObj.forceZero1);
            bo.setDrForceZero1(drForceZero1);
            String drForceCorrect2 = (String)temp.get(DrInterfaceObj.forceCorrect2);
            bo.setDrForceCorrect2(drForceCorrect2);
            String drForceZero2 = (String)temp.get(DrInterfaceObj.forceZero2);
            bo.setDrForceZero2(drForceZero2);
            String drAntitude = (String)temp.get(DrInterfaceObj.antitude);
            bo.setDrAntitude(drAntitude);
            String drMonoDamperType = (String)temp.get(DrInterfaceObj.monoDamperType);
            bo.setDrMonoDamperType(drMonoDamperType);
            String drMultiDamperType = (String)temp.get(DrInterfaceObj.multiDamperType);
            bo.setDrMultiDamperType(drMultiDamperType);
            String drXscale = (String)temp.get(DrInterfaceObj.Xscale);
            bo.setDrXScale(drXscale);
            String drYscale = (String)temp.get(DrInterfaceObj.Yscale);
            bo.setDrYScale(drYscale);
            String drTimeFactor = (String)temp.get(DrInterfaceObj.timeFactor);
            bo.setDrTimeFactor(drTimeFactor);
            String drCommPort = (String)temp.get(DrInterfaceObj.commPort);
            bo.setDrCommPort(drCommPort);
            String drVelocityInterval = (String)temp.get(DrInterfaceObj.velocityInterval);
            bo.setDrVelocityInterval(drVelocityInterval);
            String drOperator = (String)temp.get(DrInterfaceObj.operator);
            bo.setDrOperator(drOperator);
            String drChecker = (String)temp.get(DrInterfaceObj.checker);
            bo.setDrChecker(drChecker);
            String drQueryDamperType = (String)temp.get(DrInterfaceObj.QueryDamperType);
            bo.setDrQueryDamperType(drQueryDamperType);
            String drQueryCarNo = (String)temp.get(DrInterfaceObj.QueryCarNo);
            bo.setDrQueryCarNo(drQueryCarNo);
            String drQueryCarType = (String)temp.get(DrInterfaceObj.QueryCarType);
            bo.setDrQueryCarType(drQueryCarType);
            String drQueryDateYear = (String)temp.get(DrInterfaceObj.QueryDateYear);
            bo.setDrQueryDateYear(drQueryDateYear);
            String drQueryDateMonth = (String)temp.get(DrInterfaceObj.QueryDateMonth);
            bo.setDrQueryDateMonth(drQueryDateMonth);
            String drQueryDateDay = (String)temp.get(DrInterfaceObj.QueryDateDay);
            bo.setDrQueryDateDay(drQueryDateDay);
            String drAutoForceZero = (String)temp.get(DrInterfaceObj.autoForceZero);
            bo.setDrAutoForceZero(drAutoForceZero);
            String drFSlineMark = (String)temp.get(DrInterfaceObj.F_SlineMark);
            bo.setDrFSlineMark(drFSlineMark);
            String drFVlineMark = (String)temp.get(DrInterfaceObj.F_VlineMark);
            bo.setDrFVlineMark(drFVlineMark);
            String drMultiF_VlineMark = (String)temp.get(DrInterfaceObj.MultiF_VlineMark);
            bo.setDrMultifVlineMark(drMultiF_VlineMark);
            String drQueryDamperTypeEnable = (String)temp.get(DrInterfaceObj.QueryDamperTypeEnable);
            bo.setDrQueryDamperTypeEnable(drQueryDamperTypeEnable);
            String drQueryCarNoEnable = (String)temp.get(DrInterfaceObj.QueryCarNoEnable);
            bo.setDrQueryCarNoEnbale(drQueryCarNoEnable);
            String drQueryCarTypeEnable = (String)temp.get(DrInterfaceObj.QueryCarTypeEnable);
            bo.setDrQueryCarTypeEnable(drQueryCarTypeEnable);
            String drQueryDateEnable = (String)temp.get(DrInterfaceObj.QueryDateEnable);
            bo.setDrQueryDateEnable(drQueryDateEnable);
            String drBlackPrint = (String)temp.get(DrInterfaceObj.BlackPrint);
            bo.setDrBlackPrint(drBlackPrint);
            String drColorPrint = (String)temp.get(DrInterfaceObj.ColorPrint);
            bo.setDrColorPrint(drColorPrint);
            String drDataNum = (String)temp.get(DrInterfaceObj.DataNum);
            bo.setDrDataNum(drDataNum);

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iDrInterfaceService.insertByBo(bo);
        }
    }

    private void syncDamperData(HttpRequest post, String clientCode,String tempTableName) {
        if(!DamperObj.DAMPERDATA.equals(tempTableName)){
            return;
        }

        Long maxDrID = iDrDamperDataService.getMaxDrID();
        Map resultMap = post10002(post, tempTableName, maxDrID);

        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            DrDamperDataBo bo = new DrDamperDataBo();

            String drId = (String)temp.get(DamperData.ID);
            bo.setDrId(Long.valueOf(drId));
            String drDamperNo = (String)temp.get(DamperData.DamperNo);
            bo.setDrDamperNo(drDamperNo);
            String drDamperType = (String)temp.get(DamperData.DamperType);
            bo.setDrDamperType(drDamperType);
            String drCarNo = (String)temp.get(DamperData.CarNo);
            bo.setDrCarNo(drCarNo);
            String drCarType = (String)temp.get(DamperData.CarType);
            bo.setDrCarType(drCarType);
            String drProduceDate = (String)temp.get(DamperData.ProduceDate);
            bo.setDrProduceDate(drProduceDate);
            String drLastTestDate = (String)temp.get(DamperData.LastTestDate);
            bo.setDrLastTestDate(drLastTestDate);
            String drUsedMonth = (String)temp.get(DamperData.UsedMonth);
            bo.setDrUsedMonth(drUsedMonth);
            String drUsedLength = (String)temp.get(DamperData.UsedLength);
            bo.setDrUsedLength(drUsedLength);
            String drFV = (String)temp.get(DamperData.F_V);
            bo.setDrFV(drFV);
            String drAmplititude = (String)temp.get(DamperData.Amplititude);
            bo.setDrAmplititude(drAmplititude);
            String drFriquency = (String)temp.get(DamperData.Friquency);
            bo.setDrFriquency(drFriquency);
            String drVelocityInterval = (String)temp.get(DamperData.VelocityInterval);
            bo.setDrVelocityInterval(drVelocityInterval);
            String drTotalResult = (String)temp.get(DamperData.TotalResult);
            bo.setDrTotalResult(drTotalResult);
            String drTestDate = (String)temp.get(DamperData.TestDate);
            bo.setDrTestDate(drTestDate);
            String drOperator = (String)temp.get(DamperData.Operator);
            bo.setDrOperator(drOperator);
            String drChecker = (String)temp.get(DamperData.Checker);
            bo.setDrChecker(drChecker);
            String drTestSetNum = (String)temp.get(DamperData.TestSetNum);
            bo.setDrTestSetNum(drTestSetNum);
            String drVelocitySet0 = (String)temp.get(DamperData.VelocitySet0);
            bo.setDrVelocitySet0(drVelocitySet0);
            String drFtset0 = (String)temp.get(DamperData.Ftset0);
            bo.setDrFtset0(drFtset0);
            String drFpset0 = (String)temp.get(DamperData.Fpset0);
            bo.setDrFpset0(drFpset0);
            String drErrPset0 = (String)temp.get(DamperData.ErrPset0);
            bo.setDrErrPset0(drErrPset0);
            String drErrNset0 = (String)temp.get(DamperData.ErrNset0);
            bo.setDrErrNset0(drErrNset0);
            String drDissymmetrySet0 = (String)temp.get(DamperData.DissymmetrySet0);
            bo.setDrDissymmetrySet0(drDissymmetrySet0);
            String drVelocitySet1 = (String)temp.get(DamperData.VelocitySet1);
            bo.setDrVelocitySet1(drVelocitySet1);
            String drFtset1 = (String)temp.get(DamperData.Ftset1);
            bo.setDrFtset1(drFtset1);
            String drFpset1 = (String)temp.get(DamperData.Fpset1);
            bo.setDrFpset1(drFpset1);
            String drErrPset1 = (String)temp.get(DamperData.ErrPset1);
            bo.setDrErrPset1(drErrPset1);
            String drErrNset1 = (String)temp.get(DamperData.ErrNset1);
            bo.setDrErrNset1(drErrNset1);
            String drDissymmetrySet1 = (String)temp.get(DamperData.DissymmetrySet1);
            bo.setDrDissymmetrySet1(drDissymmetrySet1);
            String drVelocitySet2 = (String)temp.get(DamperData.VelocitySet2);
            bo.setDrVelocitySet2(drVelocitySet2);
            String drFtset2 = (String)temp.get(DamperData.Ftset2);
            bo.setDrFtset2(drFtset2);
            String drFpset2 = (String)temp.get(DamperData.Fpset2);
            bo.setDrFpset2(drFpset2);
            String drErrPset2 = (String)temp.get(DamperData.ErrPset2);
            bo.setDrErrPset2(drErrPset2);
            String drErrNset2 = (String)temp.get(DamperData.ErrNset2);
            bo.setDrErrNset2(drErrNset2);
            String drDissymmetrySet2 = (String)temp.get(DamperData.DissymmetrySet2);
            bo.setDrDissymmetrySet2(drDissymmetrySet2);
            String drVelocitySet3 = (String)temp.get(DamperData.VelocitySet3);
            bo.setDrVelocitySet3(drVelocitySet3);
            String drFtset3 = (String)temp.get(DamperData.Ftset3);
            bo.setDrFtset3(drFtset3);
            String drFpset3 = (String)temp.get(DamperData.Fpset3);
            bo.setDrFpset3(drFpset3);
            String drErrPset3 = (String)temp.get(DamperData.ErrPset3);
            bo.setDrErrPset3(drErrPset3);
            String drErrNset3 = (String)temp.get(DamperData.ErrNset3);
            bo.setDrErrNset3(drErrNset3);
            String drDissymmetrySet3 = (String)temp.get(DamperData.DissymmetrySet3);
            bo.setDrDissymmetrySet3(drDissymmetrySet3);
            String drVelocitySet4 = (String)temp.get(DamperData.VelocitySet4);
            bo.setDrVelocitySet4(drVelocitySet4);
            String drFtset4 = (String)temp.get(DamperData.Ftset4);
            bo.setDrFtset4(drFtset4);
            String drFpset4 = (String)temp.get(DamperData.Fpset4);
            bo.setDrFpset4(drFpset4);
            String drErrPset4 = (String)temp.get(DamperData.ErrPset4);
            bo.setDrErrPset4(drErrPset4);
            String drErrNset4 = (String)temp.get(DamperData.ErrNset4);
            bo.setDrErrNset4(drErrNset4);
            String drDissymmetrySet4 = (String)temp.get(DamperData.DissymmetrySet4);
            bo.setDrDissymmetrySet4(drDissymmetrySet4);
            String drDt0 = (String)temp.get(DamperData.dt0);
            bo.setDrDt0(drDt0);
            String drDt1 = (String)temp.get(DamperData.dt1);
            bo.setDrDt1(drDt1);
            String drDt2 = (String)temp.get(DamperData.dt2);
            bo.setDrDt2(drDt2);
            String drDt3 = (String)temp.get(DamperData.dt3);
            bo.setDrDt3(drDt3);
            String drDt4 = (String)temp.get(DamperData.dt4);
            bo.setDrDt4(drDt4);
            //todo 数据太大了
//            String drDamperData0_0 = (String)temp.get(DamperData.damperData0_0);
//            bo.setDrDamperData00(drDamperData0_0);
//            String drDamperData0_1 = (String)temp.get(DamperData.damperData0_1);
//            bo.setDrDamperData01(drDamperData0_1);
//            String drDamperData1_0 = (String)temp.get(DamperData.damperData1_0);
//            bo.setDrDamperData10(drDamperData1_0);
//            String drDamperData1_1 = (String)temp.get(DamperData.damperData1_1);
//            bo.setDrDamperData11(drDamperData1_1);
//            String drDamperData2_0 = (String)temp.get(DamperData.damperData2_0);
//            bo.setDrDamperData20(drDamperData2_0);
//            String drDamperData2_1 = (String)temp.get(DamperData.damperData2_1);
//            bo.setDrDamperData21(drDamperData2_1);
//            String drDamperData3_0 = (String)temp.get(DamperData.damperData3_0);
//            bo.setDrDamperData30(drDamperData3_0);
//            String drDamperData3_1 = (String)temp.get(DamperData.damperData3_1);
//            bo.setDrDamperData31(drDamperData3_1);
//            String drDamperData4_0 = (String)temp.get(DamperData.damperData4_0);
//            bo.setDrDamperData40(drDamperData4_0);
//            String drDamperData4_1 = (String)temp.get(DamperData.damperData4_1);
//            bo.setDrDamperData41(drDamperData4_1);
            String drTestAmplitude0 = (String)temp.get(DamperData.TestAmplitude0);
            bo.setDrTestAmplitude0(drTestAmplitude0);
            String drVelocityTension0 = (String)temp.get(DamperData.VelocityTension0);
            bo.setDrVelocityTension0(drVelocityTension0);
            String drFtesion0 = (String)temp.get(DamperData.Ftesion0);
            bo.setDrFtesion0(drFtesion0);
            String drErrFtension0 = (String)temp.get(DamperData.ErrFtension0);
            bo.setDrErrFtension0(drErrFtension0);
            String drResultTension0 = (String)temp.get(DamperData.ResultTension0);
            bo.setDrResultTension0(drResultTension0);
            String drVelocityPress0 = (String)temp.get(DamperData.VelocityPress0);
            bo.setDrVelocityPress0(drVelocityPress0);
            String drFpress0 = (String)temp.get(DamperData.Fpress0);
            bo.setDrFpress(drFpress0);
            String drErrEpress0 = (String)temp.get(DamperData.ErrEpress0);
            bo.setDrErrEpress0(drErrEpress0);
            String drResultPress0 = (String)temp.get(DamperData.ResultPress0);
            bo.setDrResultPress0(drResultPress0);
            String drDissymmetry0 = (String)temp.get(DamperData.Dissymmetry0);
            bo.setDrDissymmetry0(drDissymmetry0);
            String drResultDissymmetry0 = (String)temp.get(DamperData.ResultDissymmetry0);
            bo.setDrResultDissymmetry0(drResultDissymmetry0);
            String drFV0 = (String)temp.get(DamperData.f_v0);
            bo.setDrFV0(drFV0);
            String drTestResult0 = (String)temp.get(DamperData.TestResult0);
            bo.setDrTestResult0(drTestResult0);
            String drTestAmplitude1 = (String)temp.get(DamperData.TestAmplitude1);
            bo.setDrTestAmplitude1(drTestAmplitude1);
            String drVelocityTension1 = (String)temp.get(DamperData.VelocityTension1);
            bo.setDrVelocityTension1(drVelocityTension1);
            String drFtension1 = (String)temp.get(DamperData.Ftension1);
            bo.setDrFtension1(drFtension1);
            String drErrFtension1 = (String)temp.get(DamperData.ErrFtension1);
            bo.setDrErrFtension1(drErrFtension1);
            String drResultTension1 = (String)temp.get(DamperData.ResultTension1);
            bo.setDrResultTension1(drResultTension1);
            String drVelocityPress1 = (String)temp.get(DamperData.VelocityPress1);
            bo.setDrVelocitypress1(drVelocityPress1);
            String drFpress1 = (String)temp.get(DamperData.Fpress1);
            bo.setDrFpress1(drFpress1);
            String drErrFpress1 = (String)temp.get(DamperData.ErrFpress1);
            bo.setDrErrFpress1(drErrFpress1);
            String drResultPress1 = (String)temp.get(DamperData.ResultPress1);
            bo.setDrResultPress1(drResultPress1);
            String drDissymmetry1 = (String)temp.get(DamperData.Dissymmetry1);
            bo.setDrDissymmetry1(drDissymmetry1);
            String drResultDissymmetry1 = (String)temp.get(DamperData.ResultDissymmetry1);
            bo.setDrResultDissymmetry1(drResultDissymmetry1);
            String drFV1 = (String)temp.get(DamperData.f_v1);
            bo.setDrFV1(drFV1);
            String drTestResult1 = (String)temp.get(DamperData.TestResult1);
            bo.setDrTestResult1(drTestResult1);
            String drTestAmplitude2 = (String)temp.get(DamperData.TestAmplitude2);
            bo.setDrTestAmplitude2(drTestAmplitude2);
            String drVelocityTension2 = (String)temp.get(DamperData.VelocityTension2);
            bo.setDrVelocityTension2(drVelocityTension2);
            String drFtension2 = (String)temp.get(DamperData.Ftension2);
            bo.setDrFtension2(drFtension2);
            String drErrFtension2 = (String)temp.get(DamperData.ErrFtension2);
            bo.setDrErrFtension2(drErrFtension2);
            String drResultTension2 = (String)temp.get(DamperData.ResultTension2);
            bo.setDrResultTension2(drResultTension2);
            String drVelocityPress2 = (String)temp.get(DamperData.VelocityPress2);
            bo.setDrVelocityPress2(drVelocityPress2);
            String drFpress2 = (String)temp.get(DamperData.Fpress2);
            bo.setDrFpress2(drFpress2);
            String drErrFpress2 = (String)temp.get(DamperData.ErrFpress2);
            bo.setDrErrFpress2(drErrFpress2);
            String drResultPress2 = (String)temp.get(DamperData.ResultPress2);
            bo.setDrResultPress2(drResultPress2);
            String drDissymmetry2 = (String)temp.get(DamperData.Dissymmetry2);
            bo.setDrDissymmetry2(drDissymmetry2);
            String drResultDissymmetry2 = (String)temp.get(DamperData.ResultDissymmetry2);
            bo.setDrResultDissymmetry2(drResultDissymmetry2);
            String drFV2 = (String)temp.get(DamperData.f_v2);
            bo.setDrFV2(drFV2);
            String drTestResult2 = (String)temp.get(DamperData.TestResult2);
            bo.setDrTestResult2(drTestResult2);
            String drTestAmplitude3 = (String)temp.get(DamperData.TestAmplitude3);
            bo.setDrTestAmplitude3(drTestAmplitude3);
            String drVelocityTension3 = (String)temp.get(DamperData.VelocityTension3);
            bo.setDrVelocityTension3(drVelocityTension3);
            String drFtension3 = (String)temp.get(DamperData.Ftension3);
            bo.setDrFtension3(drFtension3);
            String drErrFtension3 = (String)temp.get(DamperData.ErrFtension3);
            bo.setDrErrFtension3(drErrFtension3);
            String drResultTension3 = (String)temp.get(DamperData.ResultTension3);
            bo.setDrResultTension3(drResultTension3);
            String drVelocityPress3 = (String)temp.get(DamperData.VelocityPress3);
            bo.setDrVelocityPress3(drVelocityPress3);
            String drFpress3 = (String)temp.get(DamperData.Fpress3);
            bo.setDrFpress3(drFpress3);
            String drErrFpress3 = (String)temp.get(DamperData.ErrFpress3);
            bo.setDrErrFpress3(drErrFpress3);
            String drResultPress3 = (String)temp.get(DamperData.ResultPress3);
            bo.setDrResultPress3(drResultPress3);
            String drDissymmetry3 = (String)temp.get(DamperData.Dissymmetry3);
            bo.setDrDissymmetry3(drDissymmetry3);
            String drResultDissymmetry3 = (String)temp.get(DamperData.ResultDissymmetry3);
            bo.setDrResultDissymmetry3(drResultDissymmetry3);
            String drFV3 = (String)temp.get(DamperData.f_v3);
            bo.setDrFV3(drFV3);
            String drTestResult3 = (String)temp.get(DamperData.TestResult3);
            bo.setDrTestResult3(drTestResult3);
            String drTestAmplitude4 = (String)temp.get(DamperData.TestAmplitude4);
            bo.setDrTestAmplitude4(drTestAmplitude4);
            String drVelocityTension4 = (String)temp.get(DamperData.VelocityTension4);
            bo.setDrVelocityTension4(drVelocityTension4);
            String drFtension4 = (String)temp.get(DamperData.Ftension4);
            bo.setDrFtension4(drFtension4);
            String drErrFtension4 = (String)temp.get(DamperData.ErrFtension4);
            bo.setDrErrFtension4(drErrFtension4);
            String drResultTension4 = (String)temp.get(DamperData.ResultTension4);
            bo.setDrResultTension4(drResultTension4);
            String drVelocityPress4 = (String)temp.get(DamperData.VelocityPress4);
            bo.setDrVelocityPress4(drVelocityPress4);
            String drFpress4 = (String)temp.get(DamperData.Fpress4);
            bo.setDrFpress4(drFpress4);
            String drErrFpress4 = (String)temp.get(DamperData.ErrFpress4);
            bo.setDrErrFpress4(drErrFpress4);
            String drResultPress4 = (String)temp.get(DamperData.ResultPress4);
            bo.setDrResultPress4(drResultPress4);
            String drDissymmmetry4 = (String)temp.get(DamperData.Dissymmmetry4);
            bo.setDrDissymmmetry4(drDissymmmetry4);
            String drResultDissymmetry4 = (String)temp.get(DamperData.ResultDissymmetry4);
            bo.setDrResultDissymmetry4(drResultDissymmetry4);
            String drFV4 = (String)temp.get(DamperData.f_v4);
            bo.setDrFV4(drFV4);
            String drTestResult4 = (String)temp.get(DamperData.TestResult4);
            bo.setDrTestResult4(drTestResult4);
            String drRemark = (String)temp.get(DamperData.Remark);
            bo.setDrRemark(drRemark);

            bo.setDrId(Long.valueOf(drId));
            bo.setDrDamperNo(drDamperNo);

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iDrDamperDataService.insertByBo(bo);
        }
    }

    private void syncChecker(HttpRequest post, String clientCode,String tempTableName) {
        if(!DamperObj.CHECKER.equals(tempTableName)){
            return;
        }

        Long maxDrID = iDrCheckerService.getMaxDrID();
        Map resultMap = post10002(post, tempTableName, maxDrID);

        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            DrCheckerBo bo = new DrCheckerBo();
            String drId = (String)temp.get(DamperObj.checker[0]);
            String drCheckerName = (String)temp.get(DamperObj.checker[1]);
            bo.setDrId(Long.valueOf(drId));
            bo.setDrCheckerName(drCheckerName);

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iDrCheckerService.insertByBo(bo);
        }
    }

    private void syncCarType(HttpRequest post,String clientCode,String tempTableName){

        if(!DamperObj.CARTYPE.equals(tempTableName)){
            return;
        }

        Long maxDrID = iDrCartypeService.getMaxDrID();
        Map resultMap = post10002(post, tempTableName, maxDrID);

        List<Map> lines = (List<Map>)resultMap.get("lines");
        for(Map temp : lines){
            DrCartypeBo bo = new DrCartypeBo();
            String drId = (String)temp.get(DamperObj.carType[0]);
            String drInstallcarType = (String)temp.get(DamperObj.carType[1]);
            bo.setDrId(Long.valueOf(drId));
            bo.setDrInstallcartype(drInstallcarType);

            bo.setDjNo(clientCode);
            bo.setCreateBy("admin");
            bo.setCreateTime(new Date());
            bo.setUpdateBy("admin");
            bo.setUpdateTime(new Date());
            iDrCartypeService.insertByBo(bo);
        }
    }

    private Map post10002(HttpRequest post, String tempTableName, Long maxDrID) {
        String maxDrIDStr = null;
        if(maxDrID !=null){
            maxDrIDStr = maxDrID.toString();
        }
        String body = get10002Body(tempTableName, maxDrIDStr);
        post.body(body);
        HttpResponse execute = post.execute();
        String result = execute.body();
        Map resultMap = getResult(result);
        return resultMap;
    }

    private String get10002Body(String tempTableName, String condition){
        Map body = new HashMap();
        body.put("tableName", tempTableName);
        body.put("condition", condition);
        return JSONUtil.toJsonStr(body);
    }

    private Map getResult(String result){

        JSONObject resultMap = JSONObject.parseObject(result);
        String tableName = (String)resultMap.get("tableName");
        JSONArray linesArray = (JSONArray)resultMap.get("lines");
        List<Map> liens = new ArrayList<>();
        for(int i=0; i<linesArray.size(); i++){
            JSONObject jsonObject = linesArray.getJSONObject(i);
            Map<String, Object> innerMap = jsonObject.getInnerMap();
            liens.add(innerMap);
        }

        Map ret = new HashMap();
        ret.put("tableName",tableName);
        ret.put("lines",liens);
        return ret;
    }

    private Map getStrResult(String result){

        JSONObject resultMap = JSONObject.parseObject(result);
        String tableName = (String)resultMap.get("tableName");
        JSONArray linesArray = (JSONArray)resultMap.get("lines");
        List<String> liens = new ArrayList<>();
        for(int i=0; i<linesArray.size(); i++){
            liens.add(linesArray.getString(i));
        }

        Map ret = new HashMap();
        ret.put("tableName",tableName);
        ret.put("lines",liens);
        return ret;
    }

    private Map post10003(HttpRequest post, String tempTableName, String maxMcgsTime) {

        String body = get10003Body(tempTableName, maxMcgsTime);
        post.body(body);
        HttpResponse execute = post.execute();
        String result = execute.body();
        Map resultMap = getResult(result);
        return resultMap;
    }

    private String get10003Body(String tempTableName, String condition){
        Map body = new HashMap();
        body.put("tableName", tempTableName);
        body.put("condition", condition);
        return JSONUtil.toJsonStr(body);
    }


}
